打程序要注意。public void actionPerformed (ActionEvent e)if (clickMe.getLabel().equals("Click Me"))

解决方案 »

  1.   

    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("没");
             
             }
    }
    };
    修该完了 你自己去看看有那些错误`搞懂了给分`
      

  2.   

    HTML中的代码如下
    <html>
    <head>
    <applet  code="FirstApplet " height="200" width="200"></applet>
    </head>
    </html>
      

  3.   

    我也觉得是
    actionPerformed!