Here you can find the source of setLaf()
public static void setLaf()
//package com.java2s; //License from project: Open Source License import java.awt.Font; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.plaf.nimbus.NimbusLookAndFeel; public class Main { public static void setLaf() { try {/* w w w . j a va 2 s . co m*/ // MetalLookAndFeel.setCurrentTheme(new RayoTheme()); // UIManager.setLookAndFeel(RayoLookAndFeel.class.getName()); UIManager.setLookAndFeel(NimbusLookAndFeel.class.getName()); UIManager.put("Table.rowHeight", Integer.valueOf(25)); NimbusLookAndFeel laf = (NimbusLookAndFeel) UIManager.getLookAndFeel(); laf.getDefaults().put("defaultFont", new Font(Font.SANS_SERIF, Font.PLAIN, 16)); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { e.printStackTrace(); } } }