3 Replies Latest reply: Nov 13, 2007 8:11 PM by 807600 RSS

    Formating the date in a JSpinner

    807600
      here's the code that I have and for some reason the dateEditor isn't working.

                Date today2 = new Date();
                GregorianCalendar defaultDate = new GregorianCalendar(1, 1, 2000);
                hiredDate = new JSpinner(new SpinnerDateModel(defaultDate.getTime(), null, today2, Calendar.MONTH));
                JSpinner.DateEditor editor2 = new JSpinner.DateEditor(hiredDate, "EEE, MMM dd, yyyy");
                hiredDate.add(editor2);

      It's not printing out right in the JSpinner. Thanks in advanced.