Domanda

How can I transfer text from a JSpinner to a JTextArea? I thought about .getText(); but it's not working.

dobDate = new JSpinner(new SpinnerDateModel(today, null, null,Calendar.MONTH));
dateEdit = new JSpinner.DateEditor(dobDate, "dd/MM/yy");
dobDate.setEditor(dateEdit);
dobDate.setBounds(215,270, 120, 25);
È stato utile?

Soluzione

From JSpinner you can use getValue(). From JTextArea you can use insert() or append()

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top