Reputation: 22180
I developed a small desktop application in Netbeans using Java. The application is working as expected. I developed it under WIN7.
When i run it on Microsoft Windows, the look and feel of UI is similar to Win XP Metal theme and when i run it on MAC it shows me the same theme. I want to change that theme with respect to operating system. Right now the theme is ok for windows i am looking for solution on MAC.
Upvotes: 2
Views: 2357
Reputation: 324118
Read the secton from the Swing tutorial on How to Set the Look and Feel for information about setting/changing the LAF.
Upvotes: 4
Reputation: 17727
If you're using Swing, then this should work:
try {
UIManager.setLookAndFeel(
UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
}
Upvotes: 5
Reputation: 117587
try{UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());}
catch(Exception e){}
Upvotes: 5