我有一个Applet单独没有任何主类,现在我想创建一个java主类(LIKE LOGIN PAGE)从我想要的调用小程序
这是我想要调用的Applet主类
public class Appletmain extends Applet
{
public Appletmain()
{
canvas = new Canvas(this);
option = new Option(this);
docu = new Docu(this);
route = new Route();
}
public void init()
{
setLayout(new BorderLayout(10, 10));
add("Center", canvas);
add("North", docu);
add("East", option);
add("South", route);
}
public Insets insert()
{
return new Insets(10, 10, 10, 10);
}
public void lock()
{
canvas.lock();
option.lock();
}
public void unlock()
{
canvas.unlock();
option.unlock();
}
Canvas canvas;
Option option;
Docu docu;
Route route;
}
这是我的java主要方法
public class main {
public static void main(String[] args) {
Appletmain b=new Appletmain();
}
}