0

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?

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
Angel Ruvalcaba
  • 105
  • 1
  • 6

1 Answers1

2

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

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366