import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class oneApp extends Applet implements ActionListener{
TextField t1=new TextField(5);
TextField t2=new TextField(5);
TextField t3=new TextField(5);
Button btn=new Button( "发送 ");
public void init(){
add(t1);add(t2);add(t3);add(btn);
btn.addActionListener(this);
}
public void actionPerformed(ActionEvent e){
anotherApp another=(anotherApp)getAppletContext().getApplet( "anotherApp ");
if(another!=null){
another.draw(Integer.parseInt(t1.getText().trim()),Integer.parseInt(t1.getText().trim()),Integer.parseInt(t1.getText().trim()));
Integer.parseInt(t1.getText().trim());
}
}
}
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class anotherApp extends Applet{
public void draw(int x,int y,int r){
Graphics g=this.getGraphics();
g.drawOval(x-r, y-r, 2*r, 2*r);
}
}
<html>
<head>
</head>
<body bgcolor= "#000000 ">
<center>
<applet code= "oneApp.class " width= "200 " height= "150 "> </applet>
<applet name= "anotherApp " code= "anotherApp.class " width= "200 " height= "150 ">
</applet>
</center>
</body>
</html>
结果是APPLET并没有运行
请问是什么原因
请大家帮忙出主意
到底如何运行APPLET
请您说详细点
------解决方案--------------------
APPLETVIEVER
或直接HTML中嵌入