How to detect if the Jspinner value has been changed?

Asked

Viewed 91 times

0

I want to carry out an action whenever the value of the JSpinner is changed. How do I do this?

1 answer

2


Just apply the event ChangeListener to the component:

spinner.addChangeListener(e -> {
    //faça algo quando o valor alterar
});

Demonstration:

demonstração do evento

Browser other questions tagged

You are not signed in. Login or sign up in order to post.