I have the following problem. I need to get an UI properties:
UIManager.getString("OptionPane.okButtonText")
that returns the string "OK"
, and it works. However, if I iterate through the UIDefaults
keyset, I never get the key "OptionPane.okButtonText"
. Does anyone know why it happens? I get the UIDefaults
in three different way (UIManager.getDefaults()
, UIManager.getLookAndFeel().getDefaults()
and UIManager.getLookAndFeelDefaults()
), but no one of these work.
Edit: I also find this list of properties of the class JFileChooser, that contains some properties that do not appear int the UIDefaults
keyset. The problem is: how programmatically get all this properties?
Edit: Example of code:
UIDefaults defaults = UIManager.getDefaults();
String thekey = "OptionPane.okButtonText";
System.out.println(thekey + ": " + UIManager.getString(thekey));
for (Enumeration e = defaults.keys(); e.hasMoreElements();) {
Object key = e.nextElement();
System.out.println(key + ": " + defaults.get(key));
}
this code return print these properties. The key "OptionPane.okButtonText"
dont appear in the output.