Source code: com/theotherbell/ui/DateFieldSample.java
1 /***********************************************************
2
3 DateFieldSample.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 DateFieldSample {
37 public static void main(String[] args) {
38 JDialog dlg = new JDialog(new Frame(), true);
39 DateField df = new DateField();
40 dlg.getContentPane().add(df);
41 dlg.pack();
42 dlg.show();
43 System.out.println(df.getDate().toString());
44 System.exit(0);
45 }
46 }