• Post Reply Bookmark Topic Watch Topic
  • New Topic

graphics buttons

 
hennie louw
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that one can put an image in a label but can one put a image in a button and if so is there a way to make the button take on the shape of the image, eg the image is a circle and when you move the mouse over it the button gets raised , but only the circle not the square itself
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would have to do this yourself by extending Panel or Canvas, making it able to display seperate images based on button button states in the paint() method, and add a MouseListener to it to detect when images should change.

-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!