Example usage for javax.swing JApplet start

List of usage examples for javax.swing JApplet start

Introduction

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

Prototype

public void start() 

Source Link

Document

Called by the browser or applet viewer to inform this applet that it should start its execution.

Usage

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);/*  w  ww.  j a  v  a  2  s.  c o 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();/* w  w w.j  a va2s.co m*/
    ap.start();
    f.add("Center", ap);
    f.pack();
    f.setVisible(true);

}

From source file:Box2.java

public static void run(JApplet applet, int width, int height) {
    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(applet);//from w  w w.  ja  v  a2s .c  o  m
    frame.setSize(width, height);
    applet.init();
    applet.start();
    frame.setVisible(true);
}