Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
public class MyFormat extends JFormattedTextField.AbstractFormatter {
private SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
public Object stringToValue(String text) throws ParseException {
if ( text.length() == 0 ) return null;
return format.parse(text);
}
public String valueToString(Object value) throws ParseException {
if ( value == null ) return "";
return format.format(value);
}
}
JFormattedTextField ftf = new JFormattedTextField(new MyFormat());