KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > regis > gui > RegisFrameFactory


1 package org.sapia.regis.gui;
2
3 import javax.swing.JFrame JavaDoc;
4 import javax.swing.UIManager JavaDoc;
5 import javax.swing.UnsupportedLookAndFeelException JavaDoc;
6
7 //import com.jgoodies.plaf.plastic.Plastic3DLookAndFeel;
8

9 public class RegisFrameFactory {
10
11   public static JFrame JavaDoc newFrame(String JavaDoc name) {
12     /*
13     try {
14       UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
15     } catch(UnsupportedLookAndFeelException exception) {
16       exception.printStackTrace();
17     }*/

18     JFrame.setDefaultLookAndFeelDecorated(true);
19     JFrame JavaDoc frame = new JFrame JavaDoc(name);
20     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
21     return frame;
22   }
23 }
24
Popular Tags