program-o-steve
program-o-steve

Reputation: 2678

will i have to call the applet from the main class?

I started a new JApplet project in my Netbeans IDE . While selecting a new project i selected swing GUI forms that contained JApplet.After the project initialization was over i see a main class i.e a class that contains the main method.Because i had to do the designing for the applet i selected another JApplet GUI form . Now how to call this form from the main class ? Why is the class with the main method created when i am working with the applets ?

enter image description here

the class containing the main method is automatically created when i start a new JApplet project in my netbeans IDE.

Upvotes: 0

Views: 1733

Answers (1)

camickr
camickr

Reputation: 324197

You don't call applets from a class with a main method. Applets are loaded by a browser. Applications are invoked by using the main() method. Read the Swing Tutorial. There are sections on:

  1. How to Make Applets
  2. How to Make Frames

which should help you understand the difference.

Upvotes: 2

Related Questions