Here you can find the source of setLookAndFeel(Component comp)
private static void setLookAndFeel(Component comp) throws Exception
//package com.java2s; /*/*w w w . java 2 s . c o m*/ * Beanfabrics Framework Copyright (C) by Michael Karneim, beanfabrics.org * Use is subject to license terms. See license.txt. */ import java.awt.Component; import javax.swing.LookAndFeel; import javax.swing.SwingUtilities; import javax.swing.UIManager; public class Main { private static void setLookAndFeel(Component comp) throws Exception { if (isInEclipse()) { LookAndFeel oldLaF = UIManager.getLookAndFeel(); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); SwingUtilities.updateComponentTreeUI(comp); UIManager.setLookAndFeel(oldLaF); } } private static boolean isInEclipse() { try { Class.forName("org.eclipse.core.runtime.Platform"); return true; } catch (Exception ex) { return false; } } }