I want to perform an action whenever the value of JSpinner
is changed. How do I do this?
I want to perform an action whenever the value of JSpinner
is changed. How do I do this?
Just apply the ChangeListener
event to the component :
spinner.addChangeListener(e -> {
//faça algo quando o valor alterar
});
Demo: