The moose likes Swing / AWT / SWT / JFace and the fly likes painting image over JButton Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "painting image over JButton" Watch "painting image over JButton" New topic
Author

painting image over JButton

cinderalla rahul
Greenhorn

Joined: Jan 11, 2002
Posts: 9
hello Friends,
Tell me how image could be painted over JButton using graphics paint method.
I am able to paint over AWT button but not JButton.
Help me out.
with regards,
cinderalla.
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Cinderalla,
First off there is no need to paint an image onto a JButton. It directly supports using icons (Images) instead of text. This is what makes it so much better than Button!
I seem to recall another post by someone who was trying to have a button with multiple images responding to mouse events. The code below will use a JButton extension to perform that function. Maybe it will help you with some ideas.

Enjoy,
Manfred.
 
 
subject: painting image over JButton
 
Threads others viewed
Making an IconImage spin on a JButton
Drawing
Awt Button
Component on Image
awt button
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture