Here you can find the source of setLaf(String lafName)
Parameter | Description |
---|---|
lafName | a parameter |
public static void setLaf(String lafName)
//package com.java2s; //License from project: Open Source License import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; public class Main { /**/* w w w . j av a 2 s . com*/ * Should be called before initComponents() * * @param lafName */ public static void setLaf(String lafName) { for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if (info.getName().equals(lafName)) { try { UIManager.setLookAndFeel(info.getClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { } break; } } } }