13

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?

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
Paulywog
  • 244
  • 1
  • 3
  • 13
  • *"It can use those if it's running on Mac or Linux"* Why foist Metal on *them?* The OS X and GTK looks are both superior to the default JRE PLAF (IMO). – Andrew Thompson May 20 '12 at 06:18
  • Well I didn't even know if it was possible in the first place. I just honestly hate the Metal look. – Paulywog May 20 '12 at 12:22

1 Answers1

37

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.

Community
  • 1
  • 1
Jeffrey
  • 44,417
  • 8
  • 90
  • 141