Class JDateField

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable, SwingConstants

public class JDateField extends JTextField
This is Date mask control. Using this control we can pop up our date in the text field. And this control is developed basically for JDK1.3 and lower version support. This control is similar to JSpinner control this is available in JDK1.4 and above only.

This will set the date "yyyy/MM/dd HH:mm:ss" in this format only.

See Also:
  • Constructor Details

    • JDateField

      public JDateField(Date date)
      Create a DateField with the specified date.
      Parameters:
      date - The Date to be used
    • JDateField

      public JDateField()
  • Method Details

    • setDate

      public void setDate(Date date)
      Set the date to the Date mask control.
      Parameters:
      date - The Date to be set
    • getDate

      public Date getDate()
      Get the date from the Date mask control.
      Returns:
      The currently set date