I want to add an array of JTextFields
inside a panel with a JSpinner
but I need to repaint the panel every time the spinner's value is changed.
How can I add that 'listener' to the spinner?
Start by taking a look at How to Use Spinners and the JavaDocs for JSpinner
You could attach a ChangeListener
to the JSpinner
using JSpinner#addChangeListener
, which provide notifications when the model is updated
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.