你不是已经发过一次这样的帖子了么?import borland.jbcl.layout.*;
换成
import com.borland.jbcl.layout.*;//你这个包中少写了一个com,我试了上个Applet,试好着的,除了这个com少写了以外。

解决方案 »

  1.   

    Untitled1.java文件import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import com.borland.jbcl.layout.*;
    //import com.sun.java.swing.UIManager;
    public class Untitled1 extends Applet {
      boolean isStandalone = false;
      GridBagLayout gridBagLayout1 = new GridBagLayout();
      GridBagConstraints con=new GridBagConstraints();
      XYLayout xYLayout1 = new XYLayout();
      TextField textField1 = new TextField();
      Label label1 = new Label();
      XYLayout xYLayout2 = new XYLayout();
      public Untitled1() {
      }  public void init() {
        try {
        jbInit();
        }
        catch (Exception e) {
        e.printStackTrace();
        }
      }
      private void jbInit() throws Exception {
        textField1.setText("textField1");
        label1.setText("label1");
        this.setLayout(xYLayout2);
        con.weightx=1;
        con.weighty=2;
        this.add(label1,  new XYConstraints(0, 0, 0, 0));
        this.add(textField1, new XYConstraints(28, 18, -1, -1));
         }  public String getAppletInfo() {
        return "Applet Information";
      }
      public String[][] getParameterInfo() {
        return null;
      }
    }
    HTML文件<html>
    <head>
    </head>
    <body>
    <applet code="Untitled1.class" height=300 width=300>
    </applet>
    </body>
    </html>
    测试通过!!!如果需要我可以把工程发给你!!!