šŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #593

Re: How can I set the form's icon image ?

#593
From: Kevin Dean
Date: Wed, 07 May 2003 11:10
32 lines
1873 bytes
package mypackage;
public class MyFrame extends JFrame {
  public MyFrame() {
    setIconImage(new
ImageIcon(getClass().getResource("image/my_icon.gif")).getImage());
  }
}

The icon image in the above example resides in mypackage/image.

-- 
Check out our latest white papers at
http://www.datadevelopment.com/papers/index.html

BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server

Dolphin Data Development Ltd.
http://www.datadevelopment.com/

"Pepito Perez" <pepito@hotmail.com> wrote in message
news:3eb8e7d2$1@newsgroups.borland.com...
> Hello everybody,
>
> does anybody know how can I put a different image (*.gif, *.ico) in my
> window application?
> Iļæ½m working with JBuilder 7 over Windows XP.
>
>
> Thank you.
>
>
Technical Details
Message-ID: <3eb8e9c4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3eb8e7d2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1089d0,7b641d7ab1878cb7
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2003-05-07 04:29:15 PST
From: "Kevin Dean" <NkOdSePaAnM@datadevelopment.com>
Newsgroups: borland.public.jbuilder.java.api
References: <3eb8e7d2$1@newsgroups.borland.com>
Subject: Re: How can I set the form's icon image ?
Date: Wed, 7 May 2003 07:10:34 -0400
Lines: 34
Organization: Dolphin Data Development Ltd.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 24.57.150.243
Message-ID: <3eb8e9c4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1052305860 24.57.150.243 (7 May 2003 04:11:00 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail