How to make Java look like Windows programs?

Paulywog picture Paulywog · May 19, 2012 · Viewed 10.1k times · Source

Is there a way (using Java) to make the GUIs that you create look like normal Windows programs? I don't like the look and feel of the Java buttons and scrollers and stuff... It can use those if it's running on Mac or Linux, but I'd like it to inherit the buttons and stuff from Windows. Any suggestions?

Answer

Jeffrey picture Jeffrey · May 19, 2012

You can set the look and feel of any Swing program to the native operating system's with one call.

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName())

The Windows PLAF can be seen in the Nested Layout Example.