编译没有错误,但是在浏览器下却无法显示,希望指点
程序代码:
import java.awt.Container;
import javax.swing.*;
public class Wudi extends JApplet{
public void init(){
Container container=getContentPane();
JTextArea outputArea=new JTextArea();
container.add(outputArea);
int i,j;
String result;
result=\" \";
for(j=1;j<=10;j++)
{for(i=1;i<=j;i++)
result+=\"*\";
}
outputArea.setText(result);
}
}
import javax.swing.*;
public class Wudi extends JApplet{
public void init(){
Container container=getContentPane();
JTextArea outputArea=new JTextArea();
container.add(outputArea);
int i,j;
String result;
result=\" \";
for(j=1;j<=10;j++)
{for(i=1;i<=j;i++)
result+=\"*\";
}
outputArea.setText(result);
}
}
编译没有错误,但是在浏览器下却无法显示,希望指点
----------------解决方案--------------------------------------------------------
<code>
thank you!!!
</code>
----------------解决方案--------------------------------------------------------
你的HTML文件的代码有没有写错啊
<applet code=Wudi.class width=300 height=300></applet>
----------------解决方案--------------------------------------------------------