Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/theotherbell/ui/DatePickerSample.java


1   /***********************************************************
2   
3    DatePickerSample.java
4    Copyright (C) 2003 Brenda Bell
5   
6    ***********************************************************/
7   
8   /***********************************************************
9   
10   This file is part of JavaDatePicker.
11  
12   JavaDatePicker is free software; you can redistribute it
13   and/or modify it under the terms of the GNU Lesser
14   General Public License as published by the Free Software
15   Foundation; either version 2 of the License, or (at your
16   option) any later version.
17  
18   JavaDatePicker is distributed in the hope that it will
19   be useful, but WITHOUT ANY WARRANTY; without even the
20   implied warranty of MERCHANTABILITY or FITNESS FOR A
21   PARTICULAR PURPOSE.  See the GNU Lesser General Public
22   License for more details.
23  
24   You should have received a copy of the GNU Lesser
25   General Public License along with JavaDatePicker; if
26   not, write to the Free Software Foundation, Inc., 59
27   Temple Place, Suite 330, Boston, MA  02111-1307  USA
28  
29   ***********************************************************/
30  
31  package com.theotherbell.ui;
32  
33  import javax.swing.*;
34  import java.awt.*;
35  
36  public class DatePickerSample {
37      public static void main(String[] args) {
38          JDialog dlg = new JDialog(new Frame(), true);
39          DatePicker dp = new DatePicker();
40          dp.setHideOnSelect(false);
41          dlg.getContentPane().add(dp);
42          dlg.pack();
43          dlg.show();
44          System.out.println(dp.getDate().toString());
45          System.exit(0);
46      }
47  }