Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2003

Tip: Looking for answers? Try searching our database.

Change JFrame icon via custom LaF

Thread view: 
Robert Karlsson - 09 Dec 2003 20:24 GMT
 Hello,

Is there a way to change the JFrame icon
via a custom Look and Feel? I'm trying to
create a LaF and would like to use a "nicer" icon.

Also, is it possible to change the font
of the titlebar on a JFrame via a custom LaF?

I would prefer doing this without having
to use the setUndecorated() method and
paint it myself.

Thanks,
Rob
John Fabiani - 11 Dec 2003 00:58 GMT
I'm a newbie so take my advise with a grain of salt.  
object warningIcon = LookAndFeel.makeIcon(getClass(), "icons/warning.gif")
There is a number of resource Icons.
Hope this helps.
John

>   Hello,
>
[quoted text clipped - 11 lines]
> Thanks,
> Rob

Signature

John Fabiani

Robert Karlsson - 11 Dec 2003 10:52 GMT
Thanks for the reply, however that code only creates
the icon. What I would like to know is what property
do I set to replace the original JFrame icon with the
one you created?

The code line below changes the internalframe's closeicon
to the warningIcon you created.

UIManager.put( "InternalFrame.closeIcon", warningIcon );

But I can't seem to find the property for the JFrame's icon.

Thanks,
Rob

> I'm a newbie so take my advise with a grain of salt.   object
warningIcon = LookAndFeel.makeIcon(getClass(), "icons/warning.gif")
> There is a number of resource Icons.
> Hope this helps.
[quoted text clipped - 15 lines]
>> Thanks,
>> Rob


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.