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

Tip: Looking for answers? Try searching our database.

L&F of the JavaHelp window?

Thread view: 
Ulf_N - 22 Mar 2005 16:16 GMT
How do I change the L&F of the JavaHelp window? Simply calling
UIManager.setLookAndFeel(aLaF) doesn't work. (Why?)

Many thanks,
/ulf
Arnaud Berger - 22 Mar 2005 16:31 GMT
Hi,

Changing the L&F won't (I think) modify the UI of already instanciated
Windows.
You may want to apply SwingUtilities.updateComponentTreeUI(Component comp)
on the reluctant components.

Regards,

Arnaud

> How do I change the L&F of the JavaHelp window? Simply calling
> UIManager.setLookAndFeel(aLaF) doesn't work. (Why?)
>
> Many thanks,
> /ulf
Ulf_N - 22 Mar 2005 16:32 GMT
Arnaud Berger skrev:
> Hi,
>
> Changing the L&F won't (I think) modify the UI of already instanciated
> Windows.
> You may want to apply SwingUtilities.updateComponentTreeUI(Component comp)
> on the reluctant components.

But I do the L&F setting *before* anything else. And it works fine with
everything else in the GUI... /ulf
Arnaud Berger - 22 Mar 2005 16:54 GMT
Hi,

Maybe the help frame is statically generated (no idea).

However, I've just tested the following

display a frame
change LaF
display a frame

And the first frame does not change its LaF.

So, if you manage to find the help frame, you should really apply
SwingUtilities.updateComponentTreeUI(helpFrame)

It should work, unless JavaHelp doesn't accept non-default LaFs

Regards,

Arnaud

> Arnaud Berger skrev:
> > Hi,
[quoted text clipped - 6 lines]
> But I do the L&F setting *before* anything else. And it works fine with
> everything else in the GUI... /ulf
Thomas Fritsch - 22 Mar 2005 17:17 GMT
> How do I change the L&F of the JavaHelp window? Simply calling
> UIManager.setLookAndFeel(aLaF) doesn't work. (Why?)
>
> Many thanks,
> /ulf

Try out the following:

   UIManager.setLookAndFeel(aLaF);
   Frame frames[] = Frame.getFrames();
   for (int i = 0; i < frames.length; i++)
     SwingUtilities.updateComponentTreeUI(frames[i]);

This should change the L&F of *all* frames of your application,
including the JavaHelp window.

Signature

"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')



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.