Here you can find the source of setNiceSwingLookAndFeel()
public static void setNiceSwingLookAndFeel()
//package com.java2s; //License from project: Open Source License import javax.swing.UnsupportedLookAndFeelException; public class Main { public static void setNiceSwingLookAndFeel() { try {//from w w w . j a v a 2s .c o m for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if (javax.swing.UIManager.getSystemLookAndFeelClassName().equals(info.getClassName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); } if ("com.sun.java.swing.plaf.gtk.GTKLookAndFeel".equals(info.getClassName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { e.printStackTrace(); } } }