Jame
Jame

Reputation: 22180

NetBeans: How to change the look and feel with respect to Operating System

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

Answers (3)

camickr
camickr

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

qwertzguy
qwertzguy

Reputation: 17727

If you're using Swing, then this should work:

try {
  UIManager.setLookAndFeel(
    UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
}

Upvotes: 5

Eng.Fouad
Eng.Fouad

Reputation: 117587

try{UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());}
catch(Exception e){}

Upvotes: 5

Related Questions