Is it possible to know , from inside a ChangeListener receiving a ChangeEvent from a JSpinner, which button (increment/decrement) has been pressed?
Short answer : No there's no way to know which button was pressed
Long answer : depending on your model and your change listener, if you do a comparison between the new value and the previous value, it is possible to know if the user went forward or backward.
You can inspect the object firing the event. Perhaps save the value prior to the event and determine whether it went up or down during the event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With