import javax.swing.*; public class LookAndFeelList { public static void main(String[] args) { UIManager.LookAndFeelInfo[] looks = UIManager.getInstalledLookAndFeels(); for (UIManager.LookAndFeelInfo look : looks) { System.out.println(look.getName()); } } }
import javax.swing.*; public class SetLookAndFeel { public static void main(String[] args) { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); // code to create and display the application's user interface } catch (Exception e) { e.printStackTrace(); } } }This code sets the look and feel to the Windows look and feel, and then proceeds to create and display the application's user interface using that look and feel. The package library for javax.swing.UIManager is "javax.swing".