Mouse over events with JButton

前端 未结 2 391
迷失自我
迷失自我 2021-01-14 10:02

I\'m trying to create a custom mouse over event on a JButton. The reason being that my JButton is currently an image, so I had to remove all the borders and animations and w

2条回答
  •  天涯浪人
    2021-01-14 10:49

    1. for Icon to use implemented methods in API

    2. you can to use ButtonModel with ChangeListener

    3. (by default) for JButtons JComponents there no reason to use Mouse(Xxx)Listener or its MouseEvent, all those events are implemented and correctly

提交回复
热议问题