1 package be
.nikiroo
.utils
.ui
;
3 import javax
.swing
.UIManager
;
4 import javax
.swing
.UnsupportedLookAndFeelException
;
7 * Some Java Swing utilities.
11 public class UIUtils
{
13 * Set a fake "native look & feel" for the application if possible
14 * (check for the one currently in use, then try GTK).
16 * <b>Must</b> be called prior to any GUI work.
18 static public void setLookAndFeel() {
21 String noLF
= "javax.swing.plaf.metal.MetalLookAndFeel";
22 String lf
= UIManager
.getSystemLookAndFeelClassName();
24 lf
= "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
25 UIManager
.setLookAndFeel(lf
);
26 } catch (InstantiationException e
) {
27 } catch (ClassNotFoundException e
) {
28 } catch (UnsupportedLookAndFeelException e
) {
29 } catch (IllegalAccessException e
) {