By Alvin Alexander. Last updated: June 4, 2016
Java Swing FAQ: How do I set my Java/Swing (GUI) application to use the default look and feel of the current system/platform?
In a Java / Swing application, to use the default look and feel of the current operating system (platform), first import the necessary class:
import javax.swing.UIManager;
Then use this code:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());