I have a JSpinner
which I add to the JPanel
I would like to set its time to the :GregorianCalendar calendar
JSpinner spin
One should do:
SpinnerDateModel model = new SpinnerDateModel();
model.setCalendarField(Calendar.DAY_OF_YEAR);
JSpinner spinner = new JSpinner();
spinner.setModel(model);
SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
java.sql.Time time = new java.sql.Time(osoba.getDataZatrudnienia().getTime().getTime());
spinner.setValue(time);