Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JButton  RSS feed

 
mitesh mehta
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a button.But i want to add a raised effect to the button for a MouseMove over event.
Can anyone please suggest how to do it.
Thanks.
Mitesh
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add a mouselistener to your Button. Set borderPainted(false). When mouseEntered(MouseEvent e) occurs, setBorderPainted(true), when mouseExited(MouseEvent e) occurs, setBorderPainted(false) again.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!