List of usage examples for javax.swing JFrame show
@Deprecated public void show()
From source file:FillPolyPanel.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.setTitle("FillPoly"); frame.setSize(300, 200);//from w w w . j a va2s . c o m frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); Container contentPane = frame.getContentPane(); contentPane.add(new FillPolyPanel()); frame.show(); }
From source file:ArcDemo2D.java
public static void main(String s[]) { JFrame f = new JFrame(""); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0);// w ww .j a v a 2 s. co m } }); JApplet applet = new ArcDemo2D(); f.getContentPane().add("Center", applet); applet.init(); f.pack(); f.setSize(new Dimension(300, 300)); f.show(); }
From source file:AreaSubtract.java
public static void main(String s[]) { JFrame f = new JFrame("Pear"); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0);//from w w w. jav a 2 s.c o m } }); JApplet applet = new AreaSubtract(); f.getContentPane().add("Center", applet); applet.init(); f.pack(); f.setSize(new Dimension(150, 200)); f.show(); }
From source file:FontPanel.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.setTitle("NotHelloWorld2"); frame.setSize(350, 200);/*from ww w . j ava 2s. com*/ frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); Container contentPane = frame.getContentPane(); contentPane.add(new FontPanel()); frame.show(); }
From source file:EllipseDemo2D.java
public static void main(String s[]) { JFrame f = new JFrame(""); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0);/*from w w w .j av a 2 s.c o m*/ } }); JApplet applet = new EllipseDemo2D(); f.getContentPane().add("Center", applet); applet.init(); f.pack(); f.setSize(new Dimension(300, 300)); f.show(); }
From source file:RectangleDemo2D.java
public static void main(String s[]) { JFrame f = new JFrame(""); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0);/*from www .ja v a 2 s . c om*/ } }); JApplet applet = new RectangleDemo2D(); f.getContentPane().add("Center", applet); applet.init(); f.pack(); f.setSize(new Dimension(300, 300)); f.show(); }
From source file:MulticastEvent.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.setTitle("MulticastTest"); frame.setSize(300, 200);/* w w w . j a v a 2s . c om*/ frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); Container contentPane = frame.getContentPane(); contentPane.add(new MulticastEvent()); frame.show(); }
From source file:GradientPaintEllipse.java
public static void main(String s[]) { JFrame f = new JFrame(""); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0);//w ww.j ava 2 s . c om } }); JApplet applet = new GradientPaintEllipse(); f.getContentPane().add("Center", applet); applet.init(); f.pack(); f.setSize(new Dimension(300, 300)); f.show(); }
From source file:LineDemo2D.java
public static void main(String s[]) { JFrame f = new JFrame("ShapesDemo2D"); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0);//from w w w.j a va 2s.c o m } }); JApplet applet = new LineDemo2D(); f.getContentPane().add("Center", applet); applet.init(); f.pack(); f.setSize(new Dimension(300, 300)); f.show(); }
From source file:FilledRectangleDemo2D.java
public static void main(String s[]) { JFrame f = new JFrame(""); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0);//from www .j av a 2 s . c o m } }); JApplet applet = new FilledRectangleDemo2D(); f.getContentPane().add("Center", applet); applet.init(); f.pack(); f.setSize(new Dimension(300, 300)); f.show(); }