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 / April 2005

Tip: Looking for answers? Try searching our database.

lookandfeel

Thread view: 
arphonewsg - 08 Apr 2005 11:12 GMT
how do you use the lookandfeel?
in particular, where the .jar file should be placed?
Arnaud Berger - 08 Apr 2005 11:23 GMT
Hi,

The jar should be added to your classpath.

Changing LaF is done with :

UIManager.setLookAndFeel("lookAndFeelClassName");

Regards,

Arnaud

> how do you use the lookandfeel?
> in particular, where the .jar file should be placed?
IchBin - 09 Apr 2005 18:25 GMT
> Hi,
>
[quoted text clipped - 10 lines]
>>how do you use the lookandfeel?
>>in particular, where the .jar file should be placed?

Should be:
  try { UIManager.setLookAndFeel("lookAndFeelClassName"); }
  catch (Exception e) {e.printStackTrace();}

Signature

Thanks in Advance...
IchBin
__________________________________________________________________________

'The meeting of two personalities is like the contact of two chemical
substances:
 if there is any reaction, both are transformed.'
-  Carl Gustav Jung,  (1875-1961),  psychiatrist and psychologist

John McGrath - 09 Apr 2005 21:02 GMT
> > UIManager.setLookAndFeel("lookAndFeelClassName");

> Should be:
>    try { UIManager.setLookAndFeel("lookAndFeelClassName"); }
>    catch (Exception e) {e.printStackTrace();}

I am sure that Arnaud is well aware that setLookAndFeel() throws checked
exceptions.  But this code is by no means the only way to deal with them,
and is certainly not the best way under most circumstances.  The method
that contains this code could declare that it throws checked exceptions,
or you could log the exception rather than print it, or whatever.

I do not think it makes a lot of sense to specify the exception handling
when it is not central to the question at hand, and particularly when the
information required to determine how exceptions should be handled is not
available.  It just adds noise to the discussion and obscures the main
issue.

Signature

Regards,

John McGrath



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



©2008 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.