Article View: borland.public.jbuilder.java.language
Article #15536Re: icon - how to you replace the steaming coffee icon with your own
From: Steve Horsley
Date: Fri, 04 Jun 1999 00:00
Date: Fri, 04 Jun 1999 00:00
31 lines
1141 bytes
1141 bytes
ron kozak wrote:
>
> How do you override the steaming coffe icon in the top left corner with
> your own icon?
import javax.swing.*;
import java.awt.*;
import java.awt.image.*;
class FrameIcon
{
public static void main(String[] args)
{
JFrame jf = new JFrame("yer 'tis");
Image myImage = Toolkit.getDefaultToolkit().createImage("icon.gif");
if(myImage == null)
{
System.out.println("myImage is null");
return;
}
else
jf.setIconImage(myImage);
jf.pack();
jf.setVisible(true);
}
}
Steve
Technical Details
Message-ID:
<37580EA9.BE40656B@cwcom.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<375719AA.1440@golden.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,afcecc282231eb45 X-Google-Attributes: gidf74b3,public From: Steve Horsley <steve.horsley@cwcom.co.uk> Subject: Re: icon - how to you replace the steaming coffee icon with your own Date: 1999/06/04 Message-ID: <37580EA9.BE40656B@cwcom.co.uk> X-Deja-AN: 485740314 Content-Transfer-Encoding: 7bit References: <375719AA.1440@golden.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Cable & Wireless Communications Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language