javax.swing.text

Class DateFormatter

public class DateFormatter extends InternationalFormatter

DateFormatter is an {@link InternationalFormatter} that implements value to string and string to value conversion via an instance of {@link DateFormat}.
Constructor Summary
DateFormatter()
Creates a new instance using the default {@link DateFormat} object returned by {@link DateFormat#getDateInstance()}.
DateFormatter(DateFormat format)
Creates a new instance of DateFormatter using the specified DateFormat
Method Summary
voidsetFormat(DateFormat format)
Sets the format that is used by this DateFormatter.

Constructor Detail

DateFormatter

public DateFormatter()
Creates a new instance using the default {@link DateFormat} object returned by {@link DateFormat#getDateInstance()}.

DateFormatter

public DateFormatter(DateFormat format)
Creates a new instance of DateFormatter using the specified DateFormat

Parameters: format the DateFormat to use

Method Detail

setFormat

public void setFormat(DateFormat format)
Sets the format that is used by this DateFormatter.

Parameters: format the DateFormat to use