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 2004

Tip: Looking for answers? Try searching our database.

Custom LnF problem

Thread view: 
Robert Karlsson - 05 Apr 2004 14:34 GMT
 Hello,

I have a problem that concerns switching from
my custom Look and Feel to the Metal LnF.

When doing this the Metal LnF does not look
the way it is supposed to (wrong colours etc).
For some components the colours are ok, for
others they are not.

My question is therefore, is this is a known
problem with the Metal LnF since Motif and
Windows LnF does appear to look as they should,
or may it be a fault on my behalf?

Thanks,
Robert
Karsten Lentzsch - 05 Apr 2004 16:35 GMT
Check whether the resources you use in your LnF
implement the UIResource marker interface.
This interface indicates whether a new LnF
can replace an existing border, color, inset,
etc or keeps it because it's a custom resource.

Also, there are a couple of problems when switching
a look-and-feel at runtime. I've worked around
a bunch of them but in general I recommend to
not switch the look at runtime.

Karsten
Robert Karlsson - 06 Apr 2004 05:28 GMT
> Check whether the resources you use in your LnF
> implement the UIResource marker interface.
> This interface indicates whether a new LnF
> can replace an existing border, color, inset,
> etc or keeps it because it's a custom resource.

> Also, there are a couple of problems when switching
> a look-and-feel at runtime. I've worked around
> a bunch of them but in general I recommend to
> not switch the look at runtime.
>
> Karsten

Thanks for your help Karsten, I will take
a look at UIResource.

It is a pity that it does not work smoother
when switching from different LnFs. Hopefully
it will be improved in future release of Java.

I have taken a look at other custom LnFs and
it doesn't seem that any LnF manages to switch
in realtime without any hassle.

I'll skip this feature for now.

Robert
Karsten Lentzsch - 06 Apr 2004 10:33 GMT
> I have taken a look at other custom LnFs and
> it doesn't seem that any LnF manages to switch
> in realtime without any hassle.

Mmh, at least you should be able to switch
from the JGoodies LnFs to other LnFs properly
- if you had no other LnF activated before.

I've taken care of all UI delegates to obey
the Swing LnF rules. You can check that in
my tools and demos, for example JDiskReport:
http://www.jgoodies.com/freeware/jdiskreport/

- Karsten
Robert Karlsson - 06 Apr 2004 18:20 GMT
>> I have taken a look at other custom LnFs and
>> it doesn't seem that any LnF manages to switch
[quoted text clipped - 10 lines]
>
> - Karsten

JGoodies LnF are to my knowledge one of the
LnFs that runs most smoothly.

Hopefully my HippoLF will improve over time :-)

It was a typo in my previous mail, I meant to
say that "it doesn't seem that *many* LnF
manages to switch in realtime without any hassle",
not any. My mistake :-/

 .:. Robert


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.