Question: Where can I get a list of all UIDefaults properties that exist in Swing?
I know of the possibility to write a small snippet of code that just extracts and displays them but I would like to know whether the list I get that way is really complete. When I do so, I get 636 properties for the Metal L&F, 613 for Windows L&F and 550 for the Motif one. Another source on the net puts a list of 795 entries although it has some incorrect additional entries. But perhaps even the metal l&f does not set all it actually could.
I have difficulties to believe there really doesn't exist an official list of possible properties from sun.
Ah, well, I should have thought about that one more intensively.
Of course the list of "valid" properties is directly dependent on the used l&f and what you want to do with it:
Write an own l&f In this case, the "official list" is the list of properties you get from the l&f you inherit. In case of MetalLookAndFeel, it's the 636 entries you can retrieve, I haven't tried the numbers for the more common BasicLookAndFeel and SynthLookAndFeel - I guess they can be checked by putting a more or less empty Subclass of those and running the code presented above.
Modify an existing l&f In this case running the code for the l&f used yields everything that can be modified.
So in the end, the solution is that there cannot be a thing like an "official overall list" as such a one can only be put based on some specific l&f, in which case the code above will yield what one wants to know.
Not all properties come from Sun. For example, Mac OS lists 654 properties + 51 specific to apple.laf.AquaLookAndFeel. Here's some code if others want to submit results: