刚学java不会的问题,求救 打程序要注意。public void actionPerformed (ActionEvent e)if (clickMe.getLabel().equals("Click Me")) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 import java.awt.*;import java.applet.Applet;import java.awt.event.*;public class FirstApplet extends Applet implements ActionListener{ private Button clickMe; public void init(){ clickMe=new Button("Click Me Not!"); clickMe.setActionCommand("click me!"); clickMe.addActionListener(this); add(clickMe); } public void actionPerformed (ActionEvent e){ if (e.getActionCommand().equals("click me")){ clickMe.setLabel("确定"); } else{ clickMe.setLabel("没"); } }};修该完了 你自己去看看有那些错误`搞懂了给分` HTML中的代码如下<html><head><applet code="FirstApplet " height="200" width="200"></applet></head></html> 我也觉得是actionPerformed! JAVA 怎么操作鼠标键盘 JDBC连接sqlserver数据库,怎么用hashmap存入表user中的内容呢 JAVA里面如何判断数据数据类型 java编译问题 初学JAVA,一个SERVLET问题,请大家来看看~ final使用时的疑问? 输入流 关于main()中参数的疑问 请问有谁知道,如何编写IE的插件程序?? 如何发送html格式邮件? 看完Think in java想住是J2EE方面发展,应该怎么学,看哪些书?? 信息产业部最应该做的工作,同意的举手。
import java.applet.Applet;
import java.awt.event.*;
public class FirstApplet extends Applet implements ActionListener
{
private Button clickMe;
public void init(){
clickMe=new Button("Click Me Not!");
clickMe.setActionCommand("click me!");
clickMe.addActionListener(this);
add(clickMe);
}
public void actionPerformed (ActionEvent e){
if (e.getActionCommand().equals("click me")){
clickMe.setLabel("确定");
}
else{
clickMe.setLabel("没");
}
}
};
修该完了 你自己去看看有那些错误`搞懂了给分`
<html>
<head>
<applet code="FirstApplet " height="200" width="200"></applet>
</head>
</html>
actionPerformed!