0
Я пытался получить строку со входа JSpinner.Как разбираться с String от JSpinner?
Как я могу разобрать вход для строки?
Я пробовал:
JSpinner jSpinner = (JSpinner) e.getSource();
dates = (Date) jSpinner.getValue();
DateFormat df = new SimpleDateFormat("HH:mm dd-MM-yyyy");
ta2.setText(df.parse((String)jSpinner.getValue()));
// or this, which works but it throws an exception because of date.
ta2.setText((String)jSpinner.getValue());