Hi all

I am aware of possibility to have an array of objects (usually Strings) as the parameter options, so we can have buttons with custom labels.
Is there any easier way to just for example change the value of OK_OPTION option button label/text from "ok" to "okAy" ?

Thanks in advance

Well, you could create your own custom dialog, but I wouldn't say that is easier than using the array for your options with showOptionDialog().

Thanks
But somewhere else i got a good answer :
using

UIManager.put("OptionPane.yesButtonText", "yeAh")

for example cause to show "yeAh" instead of "yes" for all JOption panes.
So, this is resolved.
But I dont know how to find all of swing.properties keys, however thats another subject ...

Thanks
But somewhere else i got a good answer :
using

UIManager.put("OptionPane.yesButtonText", "yeAh")

for example cause to show "yeAh" instead of "yes" for all JOption panes.
So, this is resolved.
But I dont know how to find all of swing.properties keys, however thats another subject ...

Then why don't look the API of the UIManager class. I did and there is a method: getLookAndFeelDefaults. That method returns a UIDefaults object (look the API) which extends the Hashtable (again from the API of the UIDefaults-look at the definition of the class). So it inherits methods that lets you get all the properties. For that you will need to look the API of Hashtable.

Then why don't look the API of the UIManager class. I did and there is a method: getLookAndFeelDefaults. That method returns a UIDefaults object (look the API) which extends the Hashtable (again from the API of the UIDefaults-look at the definition of the class). So it inherits methods that lets you get all the properties. For that you will need to look the API of Hashtable.

I did that...
Because This is completely a seperate subject i should have to start another thread :
http://www.daniweb.com/forums/post1210447.html#post1210447

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.