简体   繁体   中英

text from JSpinner to JTextArea

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);

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM