不好意思,是这个样子的。
服务起端是jboss+linux+mysql
客户端是win2000的。上面是个applet,然后在jsp中调用。
我在本机浏览时,applet报上面的错误。由于程序太长,所以没贴出来。
大家可以帮我分析一下是什么原因出着这个错的吗?
刚才我在本机,用eclipse调试了这个applet,没有报错,可以运行。
不知道这是什么回事?

解决方案 »

  1.   

    这是源码:
    //package com.hyi.cake.applet;
    package com.hyi.cake.applet;
    import java.io.*;
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import java.math.BigDecimal;
    import java.net.*;
    import java.util.*;public class OrderReport extends Applet implements ActionListener, MouseListener, AdjustmentListener, ItemListener {
        Connection con = null;
        Statement st = null;
        ResultSet rs = null;
        String storeID = null;
        java.sql.Date orderDate = null;
        java.sql.Date currentShopDate = null;
      //  Panel panel = new Panel();
        Panel tablePanel = new Panel();
        Label chevalLabel = new Label("货架:");
        Choice chevalID = new Choice();
        Label[] title = new Label[9];
        Label[][] table = new Label[8][9];
        Scrollbar bar = new Scrollbar(Scrollbar.VERTICAL);
        Panel scrollPanel = new Panel();
        Panel goodsPanel = new Panel();
        Label[] goodsData = new Label[10];
        Button in = new Button("登  录");
        Label totalName = new Label("本货架可订品项数:");
        Label totalName2 = new Label("本货架已订品项数:");
        Label total = new Label();
        Label total2 = new Label();
        Label error = new Label();
            int mouseX=500;
            int mouseY=400;    Font font = new Font("SERIF", Font.PLAIN, 10);
        Vector tableData = new Vector();
        Vector list = new Vector();    int oldId = 0;
        int oldValue = 0;
        int newValue = 0;
        /*
        制作一个scrollpanel
      */
        public void scrollPanelInit() {
            GridBagLayout layout = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();
            scrollPanel.setLayout(layout);
            c.weightx = 100;
            c.weighty = 100;        c.gridwidth = 15;
            c.fill = GridBagConstraints.BOTH;
            c.gridx = 0;
            c.gridy = 0;
            layout.setConstraints(tablePanel, c);
            scrollPanel.add(tablePanel);      //  bar.setValues(0, 8, 0, 0);
            bar.setVisibleAmount(8);
            bar.setBlockIncrement(8);
            bar.addAdjustmentListener(this);
            c.weightx = 0;
            c.gridwidth = 1;
            c.fill = GridBagConstraints.BOTH;
            c.gridx = 15;
            c.gridy = 0;
            layout.setConstraints(bar, c);
            scrollPanel.add(bar);
            scrollPanel.show();
        }
        public void goodsPanelInit() {
            GridBagLayout layout = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();
            goodsPanel.setLayout(layout);
            c.weightx = 100;
            c.weighty = 100;        Label lab1 = new Label("本品目前库存数");
            lab1.setAlignment(Label.CENTER);
            lab1.setFont(font);
            lab1.setBackground(new Color(74, 121, 108));
            lab1.setForeground(Color.white);
            c.gridheight = 2;
            c.gridwidth = 3;
            c.gridx = 0;
            c.gridy = 0;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab1, c);
            goodsPanel.add(lab1);        Label lab2 = new Label("前周");
            lab2.setFont(font);
            lab2.setAlignment(Label.CENTER);
            lab2.setBackground(new Color(74, 121, 108));
            lab2.setForeground(Color.white);
            c.gridwidth = 4;
            c.gridheight = 1;
            c.gridx = 3;
            c.gridy = 0;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab2, c);
            goodsPanel.add(lab2);        Label lab3 = new Label("四周平均");
            lab3.setFont(font);
            lab3.setAlignment(Label.CENTER);
            lab3.setBackground(new Color(74, 121, 108));
            lab3.setForeground(Color.white);
            c.gridx = 7;
            c.gridy = 0;
            c.gridwidth = 5;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab3, c);
            goodsPanel.add(lab3);        Label lab4 = new Label("订货量");
            lab4.setFont(font);
            lab4.setAlignment(Label.CENTER);
            lab4.setBackground(new Color(74, 121, 108));
            lab4.setForeground(Color.white);
            c.gridx = 3;
            c.gridy = 1;
            c.gridwidth = 1;
            c.gridheight = 1;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab4, c);
            goodsPanel.add(lab4);
      

  2.   

    Label lab5 = new Label("进货量");
            lab5.setFont(font);
            lab5.setAlignment(Label.CENTER);
            lab5.setBackground(new Color(74, 121, 108));
            lab5.setForeground(Color.white);
            c.gridx = 4;
            c.gridy = 1;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab5, c);
            goodsPanel.add(lab5);        Label lab6 = new Label("销货量");
            lab6.setFont(font);
            lab6.setAlignment(Label.CENTER);
            lab6.setBackground(new Color(74, 121, 108));
            lab6.setForeground(Color.white);
            c.gridx = 5;
            c.gridy = 1;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab6, c);
            goodsPanel.add(lab6);        Label lab7 = new Label("报废量");
            lab7.setFont(font);
            lab7.setAlignment(Label.CENTER);
            lab7.setBackground(new Color(74, 121, 108));
            lab7.setForeground(Color.white);
            c.gridx = 6;
            c.gridy = 1;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab7, c);
            goodsPanel.add(lab7);        Label lab8 = new Label("订货量");
            lab8.setFont(font);
            lab8.setAlignment(Label.CENTER);
            lab8.setBackground(new Color(74, 121, 108));
            lab8.setForeground(Color.white);
            c.gridx = 7;
            c.gridy = 1;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab8, c);
            goodsPanel.add(lab8);        Label lab9 = new Label("进货量");
            lab9.setFont(font);
            lab9.setAlignment(Label.CENTER);
            lab9.setBackground(new Color(74, 121, 108));
            lab9.setForeground(Color.white);
            c.gridx = 8;
            c.gridy = 1;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab9, c);
            goodsPanel.add(lab9);        Label lab10 = new Label("销货量");
            lab10.setFont(font);
            lab10.setAlignment(Label.CENTER);
            lab10.setBackground(new Color(74, 121, 108));
            lab10.setForeground(Color.white);
            c.gridx = 9;
            c.gridy = 1;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab10, c);
            goodsPanel.add(lab10);        Label lab11 = new Label("报废量");
            lab11.setFont(font);
            lab11.setAlignment(Label.CENTER);
            lab11.setBackground(new Color(74, 121, 108));
            lab11.setForeground(Color.white);
            c.gridx = 10;
            c.gridy = 1;
            c.insets = new Insets(1, 1, 1, 1);
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab11, c);
            goodsPanel.add(lab11);        Label lab12 = new Label("周数");
            lab12.setFont(font);
            lab12.setAlignment(Label.CENTER);
            lab12.setBackground(new Color(74, 121, 108));
            lab12.setForeground(Color.white);
            c.gridx = 11;
            c.gridy = 1;
            c.insets = new Insets(1, 1, 1, 1);
            c.gridwidth = 1;
            c.fill = GridBagConstraints.BOTH;
            layout.setConstraints(lab12, c);
            goodsPanel.add(lab12);        goodsData[0] = new Label();
            goodsData[0].setFont(font);
            goodsData[0].setAlignment(Label.RIGHT);
            goodsData[0].setBackground(new Color(238, 255, 238));
            goodsData[0].setForeground(Color.red);
            c.gridx = 0;
            c.gridy = 2;
            c.gridwidth = 3;
            layout.setConstraints(goodsData[0], c);
            goodsPanel.add(goodsData[0]);        for (int i = 1; i < 10; i++) {
                goodsData[i] = new Label();
                goodsData[i].setFont(font);
                goodsData[i].setAlignment(Label.RIGHT);
                goodsData[i].setBackground(new Color(238, 255, 238));
                c.gridx = i + 2;
                c.gridy = 2;
                c.gridwidth = 1;
                layout.setConstraints(goodsData[i], c);
                goodsPanel.add(goodsData[i]);
            }        goodsPanel.show();
        }