Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区 » 实战错误讨论  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:为什么这个Applet不能在浏览器显示啊? [Re:Cascading]
gj97c125





发贴: 4
积分: 0
于 2004-10-21 19:52 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我的也是啊,在学校机器上能显示,在自己的机器上就不行了

//源程序:bh.java
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;


public class bh extends Applet implements ActionListener{
Label label1=new Label("输入十进制数");TextField field4=new TextField(6);
Label label2=new Label("二进制数为");TextField field1=new TextField(6);
Label label3=new Label("八进制数为");TextField field2=new TextField(6);
Label label4=new Label("十六进制数为");TextField field3=new TextField(6);
Button button1=new Button("变换");


public void init(){ //初始化
setLayout(new GridLayout(5,2));
add(label1);add(field1);
add(label2);add(field2);
add(label3);add(field3);
add(label4);add(field4);
add(button1);
button1.addActionListener(this);
}


public void actionPerformed(ActionEvent e){ //处理按钮事件
int x=Integer.parseInt(field1.getText());
field2.setText(Integer.toBinaryString(x)); // 数值转换为字符窜
field3.setText(Integer.toOctalString(x));
field4.setText(Integer.toHexString(x));
}
}

求高手指点啊


{ Disable Smileys }


why edited on 2004-10-24 18:11


话题树型展开
人气 标题 作者 字数 发贴时间
115471 [精华] 为什么这个Applet不能在浏览器显示啊? Cascading 459 2004-10-11 11:57
106316 Re:为什么这个Applet不能在浏览器显示啊? ditty 25 2004-10-11 11:59
106273 Re:为什么这个Applet不能在浏览器显示啊? xuxiang84 14 2004-10-20 18:53
106253 Re:为什么这个Applet不能在浏览器显示啊? gj97c125 1220 2004-10-21 19:52
106401 Re:为什么这个Applet不能在浏览器显示啊? gj97c125 22 2004-10-21 19:54
106093 Re:为什么这个Applet不能在浏览器显示啊? sunzheng 38 2004-10-24 15:53
106137 Re:为什么这个Applet不能在浏览器显示啊? liuyuan310 169 2004-10-26 11:15
106120 Re:为什么这个Applet不能在浏览器显示啊? decun 173 2004-10-26 23:38
106002 Re:为什么这个Applet不能在浏览器显示啊? maoone2003 71 2004-10-30 15:24
106131 Re:为什么这个Applet不能在浏览器显示啊? aiff 165 2004-10-31 14:15
104517 Re:为什么这个Applet不能在浏览器显示啊? 装进了魔瓶 139 2005-01-21 01:48
104574 Re:为什么这个Applet不能在浏览器显示啊? lfxlixiang 173 2005-01-21 20:45
107083 Re:为什么这个Applet不能在浏览器显示啊? Cascading 52 2004-10-11 12:01
104618 Re:为什么这个Applet不能在浏览器显示啊? lfxlixiang 107 2005-01-24 17:02
104695 Re:为什么这个Applet不能在浏览器显示啊? lfxlixiang 107 2005-01-24 17:03
105390 Re:为什么这个Applet不能在浏览器显示啊? BarryWhite 59 2005-01-26 17:54
107775 Re:为什么这个Applet不能在浏览器显示啊? cjyzpcl 29 2004-10-12 14:49
107808 Re:为什么这个Applet不能在浏览器显示啊? 掙銭養老婆 13 2004-10-13 12:44
107674 Re:为什么这个Applet不能在浏览器显示啊? HW升 69 2004-10-14 21:45
107539 Re:为什么这个Applet不能在浏览器显示啊? beckham 129 2004-10-17 19:36
107463 Re:为什么这个Applet不能在浏览器显示啊? 小好 161 2004-10-18 21:45
107367 Re:为什么这个Applet不能在浏览器显示啊? HW升 122 2004-10-19 11:35
107255 Re:为什么这个Applet不能在浏览器显示啊? 小好 501 2004-10-21 22:37
107251 Re:为什么这个Applet不能在浏览器显示啊? why 216 2004-10-24 18:31
108260 Re:为什么这个Applet不能在浏览器显示啊? q_yuan 30 2004-10-15 11:08
107844 Re:为什么这个Applet不能在浏览器显示啊? beckham 415 2004-10-17 19:34
107961 Re:为什么这个Applet不能在浏览器显示啊? HW升 472 2004-10-18 12:27
107755 Re:为什么这个Applet不能在浏览器显示啊? beckham 63 2004-10-18 15:02
108030 Re:为什么这个Applet不能在浏览器显示啊? yclc 362 2004-10-20 11:26

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   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