🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18698

Re: Image on a Button

#18698
From: Greg Hamer
Date: Tue, 19 May 1998 00:00
19 lines
1168 bytes
Not possible on a java.awt.Button, but pretty easy with a
borland.jbcl.control.ButtonControl or
a com.sun.java.swing.JButton.
for a ButtonControl , you can use the setImage(Image) or setImageUrl(URL)
or setImageName(String)
depending on whether you have an actual image or something that
references an image.
If you are using swing, you use setIcon(Icon) . You need to make an
ImageIcon (which implements Icon)
to have something to set it to. ImageIcons can be constructed from a URL
,String or Image.

Amy S Lee wrote:

> Is it possible to draw an image on a button?  If yes, how?  I am at a
> lost.
>
> Amy
Technical Details
Message-ID: <35620981.72C2FE7D@corp.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <356200A5.C08CAC7A@engr.colostate.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,5bd953b5f7db2d4a
X-Google-Attributes: gidf74b3,public
From: Greg Hamer <ghamer@corp.borland.com>
Subject: Re: Image on a Button
Date: 1998/05/19
Message-ID: <35620981.72C2FE7D@corp.borland.com>
X-Deja-AN: 354764706
Content-Transfer-Encoding: 7bit
References: <356200A5.C08CAC7A@engr.colostate.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language