With Swing applications I can use an external class to instantiate and view them.
I'd like to do the same with an Applet, outside of Eclipse, without using the appletviewer.
I want to be able to Run a class MyappletRunner
and have its main
method kick off the following applet for viewing.
Given the following source code:
import java.applet.*;
import java.awt.*;
public class Myapplet extends Applet{
String str;
public void init(){
str = "This is my first applet";
}
public void paint(Graphics g){
g.drawString(str, 50,50);
}
}