Question

When I set the properties of my properties file with setProperty(), it always overwrites the old ones.

For changing one, I load and get the properties and then I set them again.

The problem is that I don't know how to set again UIManager Look and feel, because its not an equality so I can't use setProperty. Also, if I check the list of with propertyNames() to see all the keys of the properties file, all the key properties are displayed normal except UI Manager that shows the whole statement.

Enumeration of propertyNames

password
usuario
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
driver
contador

Does anyone knows how to set it?

Edit
If I use getProperty() of the key of UIManager doesn't return anything

Edit 2
I was trying to make my application's skin choosable, and the skin chosen not to reset everytime I run it. So I have to save the decision in the properties file. Sorry if the first time wasn't clear

Was it helpful?

Solution

Not very clear, but propably you have in properties:

ui = javax.swing.plaf.metal.MetalLookAndFeel

and then in your code you should do:

UIManager.setLookAndFeel(props.getProperty("ui"));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top