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 / January 2004

Tip: Looking for answers? Try searching our database.

change look and feel of just one component

Thread view: 
Robert Ludewig - 12 Dec 2003 12:51 GMT
Is there a way to change the look and feel of just one component of my
gui ?
Especially I want some XP-Style-Buttons look like metal look and feel.
The rest should still have the xp/windows look and feel.
Gerbrand van Dieijen - 13 Dec 2003 00:10 GMT
>Is there a way to change the look and feel of just one component of my
>gui ?
>Especially I want some XP-Style-Buttons look like metal look and feel.
>The rest should still have the xp/windows look and feel.

You could use .. setLookAndFeel(...) before you create the JButtons and
then set it back to the old lookandfeel. I'm not sure, but I think that
should work (slighty).

Signature

Gerbrand van Dieijen

Jon A. Cruz - 16 Jan 2004 18:07 GMT
> You could use .. setLookAndFeel(...) before you create the JButtons and
> then set it back to the old lookandfeel. I'm not sure, but I think that
> should work (slighty).

Not really.

Many (or most) of the Look-And-Feels are written to think that they are
the only one in action.
Mendrik - 21 Jan 2004 15:30 GMT
> > You could use .. setLookAndFeel(...) before you create the JButtons and
> > then set it back to the old lookandfeel. I'm not sure, but I think that
[quoted text clipped - 4 lines]
> Many (or most) of the Look-And-Feels are written to think that they are
> the only one in action.

JButton button = new JButton();
button.setUI(new javax.swing.plaf.metal.MetalButtonUI());
Jon A. Cruz - 21 Jan 2004 15:53 GMT
>>>You could use .. setLookAndFeel(...) before you create the JButtons and
>>>then set it back to the old lookandfeel. I'm not sure, but I think that
[quoted text clipped - 7 lines]
> JButton button = new JButton();
> button.setUI(new javax.swing.plaf.metal.MetalButtonUI());

Yes. But in many cases things will become confused if that's not the
current look and feel.


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.