tags:

views:

24

answers:

2

I want a text field in java swing which will take only date type of value

+2  A: 

Have a look at JFormattedTextField (a subclass of JTextField).

The example at exampledepot.com: Creating a Text Field to Display and Edit a Date should also be useful.

aioobe
+1  A: 

As another instance of @aioobe's suggestion, this example uses an InputVerifier in conjunction with JFormattedTextField.

trashgod