I want to make a simple JOptionPane but don't want the Java buttons/icon theme instead would like the windows button/icon. Now can I change it to the windows theme?
Asked
Active
Viewed 550 times
1 Answers
1
Components are created using the current LAF. No guarantee that it will work but you can do something like:
- save current LAF
- set LAF to Windows
- display JOptionPane
- restore LAF to saved LAF
See How to Set the Look and Feel for more information.

camickr
- 321,443
- 19
- 166
- 288
-
Thanks for the link, solved the problem. What I did was add UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); – user2526311 Jun 29 '13 at 00:45
-
+1 for leveraging the native L&F; a related example is seen [here](http://stackoverflow.com/a/14262706/230513). – trashgod Jun 29 '13 at 10:49