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 / September 2006

Tip: Looking for answers? Try searching our database.

How to grab the current look and feel's icon for a combobox button?

Thread view: 
Beaned - 22 Sep 2006 20:22 GMT
I am creating my own custom combobox like component and I would like to
get the current look and feel's icon for a jcombobox button. I can see
in the java source that there are class for creating this (ie
javax.swing.plaf.metal.MetalComboBoxIcon) so I would like to know how
to grab this icon for use in my button. So far all I have come up with
is to do the following:

UIDefaults defaults = UIManager.getLookAndFeelDefaults();
Object object = defaults.get("what is the key that goes in here?");

Once I get the object do I just cast it to an Icon or is there other
hoops I need to jump through?

Thanks
Totally Beaned!
Dan Andrews - 22 Sep 2006 20:58 GMT
> Object object = defaults.get("what is the key that goes in here?");

Try "CheckBox.icon".

Cheers,

Dan Andrews
- - - - - - - - - - - - - - - - - - - - - - - - -
Ansir Development Limited http://www.ansir.ca
- - - - - - - - - - - - - - - - - - - - - - - - -


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.