1 package org.sapia.gumby.test; 2 3 import javax.swing.JFrame ; 4 import javax.swing.UIManager ; 5 import javax.swing.UnsupportedLookAndFeelException ; 6 7 import com.jgoodies.plaf.plastic.Plastic3DLookAndFeel; 8 9 24 public class FrameHelper { 25 26 public static JFrame newFrame(String name) { 27 try { 28 UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); 29 } catch(UnsupportedLookAndFeelException exception) { 30 exception.printStackTrace(); 31 } 32 JFrame.setDefaultLookAndFeelDecorated(true); 33 JFrame frame = new JFrame (name); 34 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 35 return frame; 36 } 37 38 public static void main(String [] args) { 39 try { 40 JFrame frame = new JFrame ("test"); 41 } catch(Exception e) { 42 e.printStackTrace(); 43 } 44 } 45 46 } 47 | Popular Tags |