Adding ICON to JButton component

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Adding ICON to JButton component

Postby SusuMMI » Sun Jun 04, 2006 7:35 am

How do I add an icon (bmp or jpeg) to a JButton??? I looked for an image attribute.. but couldn't find it.
SusuMMI
 
Posts: 2
Joined: Sun May 28, 2006 3:45 am

Re: Adding ICON to JButton component

Postby Eric Clayberg » Sun Jun 04, 2006 11:44 am

SusuMMI wrote:How do I add an icon (bmp or jpeg) to a JButton??? I looked for an image attribute.. but couldn't find it.

You need the icon attribute.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest