小小程序完蛋了 啊咧?没问题啊我这里出现了列表框背景色为蓝色列表框里有一个选项:"sssdfdfdgfgfgf" 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我放到iis站点中已经,访问的时候是可以的 that's oktry use appletviewer URL in your pc 我試了一下有以下問題:list1.addItem("sssdfdfdgfgfgf");改成list1.add("sssdfdfdgfgfgf");編譯的時候就出錯了。用appletviewer 顯示少加了<applet></applet>當然就沒有顯示出來了代碼如下:import java.awt.*;import java.applet.*;/*<applet code="list1.class" width=300 height=100 ></applet>*/public class list1 extends Applet{ public void init(){ this.setLayout(null); this.resize(300,300); List list1=new List(); list1.setLocation(20,20); list1.setBackground(Color.blue); list1.setSize(100,100); list1.add("sssdfdfdgfgfgf"); this.add(list1,null); } } html代碼如下<html> <head> <title>The Animator Applet (1.1) - example 1</title> </head> <body> <applet code=list1.class width=200 height=100></applet> </body></html> 是不是你的客户端没有装JRE呀? Java中如何将字符串按行写入到txt文件中 面试题 字符串的位数 通过反射改变对象的值时出现问题 Table中某列定义为boolean, 而查询数据库得到的是0/1,如果直接add,出错! main()的作用? socket 问题 水仙花算法问题 不要轻易相信按用按位运算符的速度高很多! 如何修改JBuilder6的对话框大小阿? servlet 调用 rmi问题,在线等待!! 新手问题,帮忙看看这段代码
try use appletviewer URL in your pc
list1.addItem("sssdfdfdgfgfgf");
改成list1.add("sssdfdfdgfgfgf");編譯的時候就出錯了。
用appletviewer 顯示少加了
<applet></applet>當然就沒有顯示出來了
代碼如下:import java.awt.*;
import java.applet.*;
/*
<applet code="list1.class" width=300 height=100 ></applet>
*/
public class list1 extends Applet{
public void init(){
this.setLayout(null);
this.resize(300,300);
List list1=new List();
list1.setLocation(20,20);
list1.setBackground(Color.blue);
list1.setSize(100,100);
list1.add("sssdfdfdgfgfgf");
this.add(list1,null);
}
}
<html>
<head>
<title>The Animator Applet (1.1) - example 1</title>
</head>
<body>
<applet code=list1.class width=200 height=100></applet>
</body>
</html>