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?
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
JSpinnerYou could attach a
ChangeListenerto theJSpinnerusingJSpinner#addChangeListener, which provide notifications when the model is updated