Reputation: 15378
I want to make sure that the user himself could add L & F. But how to do this I do not understand. it is even possible?
Upvotes: 0
Views: 1681
Reputation: 108
The important thing is to update all components shown in the frame
UIManager.setLookAndFeel(lnfName);
SwingUtilities.updateComponentTreeUI(frame);
frame.pack();
Upvotes: 2
Reputation: 471
If I got your question right then it is pretty straight forward really. Have a look at http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html. There is even a demo app that lets you change the L&F on the fly.
The important class doing most of the work is UIManager.
Upvotes: 0