wood burning stoves 2.0
The moose likes Swing / AWT / SWT and the fly likes UI Defaults keys Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "UI Defaults keys" Watch "UI Defaults keys" New topic

UI Defaults keys

Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
An example:
Where am I expected to look up the names for such entries? For instance, "List.focusCellHighlightBorder" I have not found such attribute in the source code in JList.java
I have tried printing the hashtable returned by UIManager.getDefaults, with no success.

SCJP2. Please Indent your code using UBB Code
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

If you do a -

You can get the names of all the properties used... then look for properties beginning with "List." to get all the properties that affect a JList.

I also agree with you that they should be listed in the JavaDocs somewhere. It probably wouldn't be good to put them in the widget itself (like JList), because they can change based on the look & feel, but would be good to put them in ListUI, BasicListUI, etc. or the subclass used in the specific look & feel.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Sounds like a list that would prove useful in a SwingFaq. I know I am looking for these properties on occasion. If you don't do it Nate, I will.

GenRocket - Experts at Building Test Data
I agree. Here's the link: http://aspose.com/file-tools
subject: UI Defaults keys
It's not a secret anymore!