日期:2014-05-20  浏览次数:20625 次

救命啊!怎么总是出错??!大家帮我看下那里出错误!
package   frame;

import   java.awt.*;
import   java.awt.event.*;
import   java.applet.*;
import   javax.swing.*;

public   class   MyApplet   extends   Applet   {
    private   boolean   isStandalone   =   false;
    BorderLayout   borderLayout1   =   new   BorderLayout();
    JPanel   command   =   new   JPanel();
    JPanel   workArea   =   new   JPanel();
    JPanel   parameter   =   new   JPanel();
    JButton   jButton1   =   new   JButton();
    JButton   line   =   new   JButton();

    Operation   operation   =   null;

    Canvas   image;
    Point   startPoint,   endPoint;
    int   mouse;

    //Get   a   parameter   value
    public   String   getParameter(String   key,   String   def)   {
        return   isStandalone   ?   System.getProperty(key,   def)   :
            (getParameter(key)   !=   null   ?   getParameter(key)   :   def);
    }

    //Construct   the   applet
    public   MyApplet()   {
    }

    //Initialize   the   applet
    public   void   init()   {
        startPoint   =   new   Point(-1,-1);
        try   {
            jbInit();
        }
        catch(Exception   e)   {
            e.printStackTrace();
        }
    }

    //Component   initialization
    private   void   jbInit()   throws   Exception   {
        this.setLayout(borderLayout1);
        workArea.setBackground(Color.white);
        workArea.addMouseMotionListener(new   MyApplet_workArea_mouseMotionAdapter(this));
        workArea.addMouseListener(new   MyApplet_workArea_mouseAdapter(this));
        //workArea.addMouseMotionListener(new   MyApplet_workArea_mouseMotionAdapter(this));
        jButton1.setText( "jButton1 ");
        line.setText( "墙壁 ");
        line.addActionListener(new   MyApplet_line_actionAdapter(this));
        this.add(command,     BorderLayout.NORTH);
        command.add(line,   null);
        this.add(workArea,   BorderLayout.CENTER);
        this.add(parameter,     BorderLayout.EAST);
        parameter.add(jButton1,   null);
    }

    //Get   Applet   information
    public   String   getAppletInfo()   {
        return   "Applet   Information ";
    }

    //Get   parameter   info