/** * Apply look and feel more easily. * This method has to be called at the first line of main method. * @param name */ public static void guiSetLookAndFeel(String name) { if (name.equals("windows")) { name = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"; } else if (name.equals("motif")) { name = "com.sun.java.swing.plaf.motif.MotifLookAndFeel"; } try { javax.swing.UIManager.setLookAndFeel(name); } catch (ClassNotFoundException ex) { Ts.printErr(ex); } catch (InstantiationException ex) { Ts.printErr(ex); } catch (IllegalAccessException ex) { Ts.printErr(ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { Ts.printErr(ex); } } public static void printErr(java.lang.Exception ex) { printErr(ex.getMessage()); }