In the Java/Swing API’s ButtonModel interface, what’s the difference between the Rollover and Armed properties? Reading the code and docs, it looks like they’re both updated by the same event (mouse entering or exiting the component), but the armed value affects whether or not releasing the mouse button results in an ActionEvent being fired, whereas the Rollover property is just visual. Is there any situation where a ButtonModel would be armed but not rolled over, or vice-versa?
In the Java/Swing API’s ButtonModel interface, what’s the difference between the Rollover and Armed
Share
If I understand the docs correctly the Rollover state indicates that the user is over the button and has pressed the mouse button. So usually you will have Pressed and Armed at the same time.
Rollover triggers whenever the user moves the mouse over the button like :hover in css for example.