Question

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);
Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top