Topic: 怎样在ie里打开applet |
Print this page |
1.怎样在ie里打开applet | Copy to clipboard |
Posted by: rucca Posted on: 2003-02-19 14:41 以下.java程序,编译通过,生成test1.class文件,以<applet code="test1.class" width=150 height=160></applet> 的格式加入网页 为何无法总提示class test1 not found??? import java.awt.*; import java.applet.*; public class test1 extends Applet { TextField textField1,textField2; String answerStr; public void init() { textField1=new TextField(15); add(textField1); textField2=new TextField(15); add(textField2); answerStr="undefined"; } public void paint(Graphics g) { Font font=new Font("timesroman",Font.PLAIN,24); g.setFont(font); g.drawString("The answer is;",50,100); g.drawString(answerStr,70,130); } public boolean action(Event evt,Object arg) { String str1=textField1.getText(); String str2=textField2.getText(); int int1=Integer.parseInt(str1); int int2=Integer.parseInt(str2); int answer=int1/int2; answerStr=String.valueOf(answer); repaint(); return true; } } |
2.Re:怎样在ie里打开applet [Re: rucca] | Copy to clipboard |
Posted by: taogang Posted on: 2003-02-19 17:43 <applet code="test1.class" codebase="." width=150 height=160></applet> |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |