There seem to be a ton of UI properties that can be set with
UIManager.put("key", value);
Is there a list somewhere of all keys that can be set?
There seem to be a ton of UI properties that can be set with
UIManager.put("key", value);
Is there a list somewhere of all keys that can be set?
For what it's worth, you can find a fancier version of this where all the properties are displayed in a GUI with each component on a separate tab in a tabbed pane. You can also change the LAF. Check out UIManager Defaults.
I had a similar issue where few UI elements were displaying in tiny fonts. I have printed all the keys using below code and updated the specific elements
The code posted before just gets the properties set by the current look&feel which is the metal l&f by default.
It lists a total of 636 defined properties on my system (WinXP with Java 1.6.0_17) with less defined on Windows L&F and Motif L&F. I found another list on the internet (http://www.java2s.com/Tutorial/Java/0240__Swing/ListingUIDefaultProperties.htm) where 795 are found.
So I think the question still remains: Which properties are there? Obviously, even the Metal L&F doesn't set them all (or the code resulting in 795 is wrong).
I am puzzled by the fact there doesn't seem to exist an official list by sun, which would be what I really am looking for (as well as the OP if I got the question right).
I found the official list of resource keys used in the Nimbus Look and feel:
http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html
And the official component properties:
http://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/synth/doc-files/componentProperties.html
And here is another exhausting list (not Nimbus related). This is the source.
It depends on the Java implementation. Here is a blogpost with a simple code that you can run to see all available properties and their current values.