Example usage for javax.swing JFrame show

List of usage examples for javax.swing JFrame show

Introduction

In this page you can find the example usage for javax.swing JFrame show.

Prototype

@Deprecated
public void show() 

Source Link

Document

Makes the Window visible.

Usage

From source file:GradientPaintDemo.java

public static void main(String s[]) {
    JFrame f = new JFrame();
    f.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            System.exit(0);//  www  . j  a v  a 2s  . c o m
        }
    });
    GradientPaintDemo p = new GradientPaintDemo();
    f.getContentPane().add("Center", p);
    p.init();
    f.pack();
    f.setSize(new Dimension(250, 250));
    f.show();
}

From source file:NotHelloWorldPanel.java

public static void main(String[] args) {
    JFrame frame = new JFrame();
    frame.setTitle("NotHelloWorld");
    frame.setSize(300, 200);//w ww  .j a  v a2 s. c om
    frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            System.exit(0);
        }
    });

    Container contentPane = frame.getContentPane();
    contentPane.add(new NotHelloWorldPanel());

    frame.show();
}

From source file:DashedStrokeDemo.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  ww .  j  a  v  a 2s.  c om*/
        }
    });
    DashedStrokeDemo p = new DashedStrokeDemo();
    f.getContentPane().add("Center", p);
    p.init();
    f.pack();
    f.setSize(new Dimension(250, 250));
    f.show();
}

From source file:TransformDemo.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 .ja  v a 2  s . c o  m
        }
    });
    TransformDemo p = new TransformDemo();
    f.getContentPane().add("Center", p);
    p.init();
    f.pack();
    f.setSize(new Dimension(300, 300));
    f.show();
}

From source file:DrawPolyPanel.java

public static void main(String[] args) {
    JFrame frame = new JFrame();
    frame.setTitle("DrawPoly");
    frame.setSize(350, 250);/*from w ww .j  a v a  2 s .  com*/
    frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            System.exit(0);
        }
    });
    Container contentPane = frame.getContentPane();
    contentPane.add(new DrawPolyPanel());

    frame.show();
}

From source file:FillRectPanel.java

public static void main(String[] args) {
    JFrame frame = new JFrame();
    frame.setTitle("FillRect");
    frame.setSize(300, 200);/*from   w  ww. j a va  2  s.c  om*/
    frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            System.exit(0);
        }
    });
    Container contentPane = frame.getContentPane();
    contentPane.add(new FillRectPanel());

    frame.show();
}

From source file:TexturePaintDemo.java

public static void main(String s[]) {
    JFrame f = new JFrame();
    f.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            System.exit(0);//w w  w  .j a  v a2s .  co  m
        }
    });
    TexturePaintDemo p = new TexturePaintDemo();
    f.getContentPane().add("Center", p);
    p.init();
    f.pack();
    f.setSize(new Dimension(250, 250));
    f.show();
}

From source file:AreaAdd.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 ww . j a v a  2 s. com*/
        }
    });
    JApplet applet = new AreaAdd();
    f.getContentPane().add("Center", applet);
    applet.init();
    f.pack();
    f.setSize(new Dimension(150, 200));
    f.show();
}

From source file:FilledArc.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 a  v a  2  s  .  c o  m
        }
    });
    JApplet applet = new FilledArc();
    f.getContentPane().add("Center", applet);
    applet.init();
    f.pack();
    f.setSize(new Dimension(300, 300));
    f.show();
}

From source file:AreaIntersect.java

public static void main(String s[]) {
    JFrame f = new JFrame("Pear");
    f.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            System.exit(0);//w w w  . j  ava  2  s .c om
        }
    });
    JApplet applet = new AreaIntersect();
    f.getContentPane().add("Center", applet);
    applet.init();
    f.pack();
    f.setSize(new Dimension(150, 200));
    f.show();
}