import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; public class LookAndFeelExample { public static void main(String[] args) { try { // Set the look and feel to the system default UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { e.printStackTrace(); } // Code to create and show a JFrame window } }This example sets the look and feel of the application to the system default. Other options include cross-platform, Windows, Mac OS X, Nimbus, and others. The setLookAndFeel method belongs to the javax.swing.UIManager package library.