Example usage for javax.swing JApplet init

List of usage examples for javax.swing JApplet init

Introduction

In this page you can find the example usage for javax.swing JApplet init.

Prototype

public void init() 

Source Link

Document

Called by the browser or applet viewer to inform this applet that it has been loaded into the system.

Usage

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

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

From source file:GeneralPathDemo2D.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 om*/
        }
    });
    JApplet applet = new GeneralPathDemo2D();
    f.getContentPane().add("Center", applet);
    applet.init();
    f.pack();
    f.setSize(new Dimension(300, 300));
    f.show();
}

From source file:FilledGeneralPath.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  va  2 s  .co m*/
        }
    });
    JApplet applet = new FilledGeneralPath();
    f.getContentPane().add("Center", applet);
    applet.init();
    f.pack();
    f.setSize(new Dimension(300, 300));
    f.show();
}

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

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

From source file:Composite.java

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

From source file:ImageOps.java

public static void main(String s[]) {
    JFrame f = new JFrame("ImageOps");
    f.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            System.exit(0);//ww w.j a v  a 2  s.com
        }
    });
    JApplet applet = new ImageOps();
    f.getContentPane().add("Center", applet);
    applet.init();
    f.pack();
    f.setSize(new Dimension(550, 550));
    f.show();
}

From source file:Applet1c.java

public static void main(String[] args) {
    JApplet applet = new Applet1c();
    JFrame frame = new JFrame("Applet1c");
    // To close the application:
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(applet);/*from  www  . j a v  a 2 s . co  m*/
    frame.setSize(100, 50);
    applet.init();
    applet.start();
    frame.setVisible(true);
}

From source file:WeatherWizard.java

public static void main(String[] args) {
    JFrame f = new JFrame("Weather Wizard");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JApplet ap = new WeatherWizard();
    ap.init();
    ap.start();//from w  w  w .j  a v  a2 s  . co m
    f.add("Center", ap);
    f.pack();
    f.setVisible(true);

}