File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT / JFace and the fly likes Awt Button Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Awt Button" Watch "Awt Button" New topic
Author

Awt Button

cinderalla rahul
Greenhorn

Joined: Jan 11, 2002
Posts: 9
Hello Friends,
I am using awt button component.
I have to set image for this button,so i tried to paint the image over the button.
it worked.
But i need to change the image like JButton(normal,rollover,selected icon) for this awt using paint by mouse event.
Is this possible & will work fine.If so help me out try this.
Excepting u'r replies,
cinderalla.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4120

You have to make the images yourself, then add a mouselistener and mousemotionlistener to the button that switch the images based on the events recieved by the listeners. This functionality was built into Swing, but you have to do it yourself in AWT.

-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
 
subject: Awt Button
 
Threads others viewed
painting image over JButton
Painting an image on a button
setting an image as a label for a button
How to get image on a button using applet
awt button
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

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