I know the below code is supposed to format the FormattedTextField but it doesn't seem to do anything to the form (shown in the picture below). I was wanting, when the form loaded: the text field to look something like this

00/00/2014 - 00:00 am

Where the user is able to

- enter datelike information around the symbol separators ( / or : )

- But where the user could not remove these symbol separators


package datefield;
    import javax.swing.JFormattedTextField;
    import javax.swing.text.DateFormatter;
    public class NewJFrame extends javax.swing.JFrame {
        public NewJFrame() {
public void formattedTextField()
        jFormattedTextField1 = new JFormattedTextField(new SimpleDateFormat("MM/dd/yy - mm:HH"));
        jFormattedTextField1.setValue(new Date());
Name:  sO3em.png
Views: 124
Size:  6.2 KB