Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Ronnie Mccoy   on Oct 08 In Java Category.

  
Question Answered By: Lurline Fischer   on Oct 08

A way to use a class  as both an application  and applet  is to have the
main method call init... ie:

public class EitherWay extends javax.swing.JApplet {
public static void main (String[] args) {
EitherWay theApp = new EitherWay();
theApp.init();
}
public void init () {
// begin...
}
}

for more details about applets:
java.sun.com/docs/books/tutorial/applet/index.html

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on JApplet Problem Or get search suggestion and latest updates.


Tagged: