This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Image instead of a button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Image instead of a button" Watch "Image instead of a button" New topic

Image instead of a button

kimi lynn

Joined: Jun 02, 2003
Posts: 27
Hello everybody,
I've a simple GUI and instead of the standard text appearing on the buttons, I would like to put an image.Could somebody please tell me how can i do that in the follwing piece of code.
Many many thanks
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

The Swing Tutorial details how to make a JButton display an image.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Image instead of a button
Similar Threads
passing text from JDialog to JFrame
Some help.
How can I diplay and Applet on a swing application?
JBUtton errors(Cant resolve symbol)