String[][] a=new String[]{
{"ds", "32323", "gss", "25", "152", "55", "54", "888"},
  {grid1.setItems(a);}
  }

解决方案 »

  1.   

    给出点关键代码呀!
    不明白你的gridl.setItems(a);从什么地方冒出来的!
      

  2.   

    写错了
    String[] a={"ds", "32323", "gss", "25", "152", "55", "54", "888"}
      

  3.   

    但从异常来看,是setItems这个方法出错了。
      

  4.   

    public class B0119Panel extends JFrame  {
      JFrame frame;
      XYLayout xYLayout1 = new XYLayout();
      GroupBox groupBox1 = new GroupBox();
      GridControl grid1 = new GridControl();
      JPanel jPanel1 = new JPanel();
      BorderLayout borderLayout2 = new BorderLayout();
      XYLayout xYLayout2 = new XYLayout();
      JPanel jPanel2 = new JPanel();
      XYLayout xYLayout3 = new XYLayout();
      JTextField jTextField3 = new JTextField();
      JTextField jTextField2 = new JTextField();
      JTextField jTextField1 = new JTextField();
      JButton jButton2 = new JButton();
      JLabel jLabel2 = new JLabel();
      JButton jButton1 = new JButton();
      JLabel jLabel1 = new JLabel();
      XYLayout xYLayout4 = new XYLayout();
      JLabel jLabel4 = new JLabel();
      JPanel jPanel3 = new JPanel();  public B0119Panel() {
        try {
          jbInit();
        }
        catch(Exception ex) {
          ex.printStackTrace();
        }
      }
      void jbInit() throws Exception {
        groupBox1.setLabel("城镇职工医疗保险定点医院参保人住院不合理费用明细表");
        groupBox1.setLayout(borderLayout2);
        xYLayout1.setWidth(995);
        xYLayout1.setHeight(478);
        this.setLayout(xYLayout1);
        grid1.setColumnCaptions(new String[] {"姓名", "公民身份号码", "明细名称", "规格", "实行价格", "数量", "金额", "审定价格", "审定数量", "审定金额", "核减金额", "自负比例", "备注"});
        jPanel1.setLayout(xYLayout2);
        jPanel2.setLayout(xYLayout3);
        jButton2.setText("分析");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            jButton2_actionPerformed(e);
          }
        });
        jLabel2.setText("操作员姓名");
        jButton1.setText("打印");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            jButton1_actionPerformed(e);
          }
        });
        jLabel1.setHorizontalTextPosition(SwingConstants.RIGHT);
        jLabel1.setText("操作员代码");
        jLabel4.setText("操作时间");
        jPanel3.setLayout(xYLayout4);
        this.add(groupBox1,    new XYConstraints(14, 87, 959, 375));
        groupBox1.add(grid1, BorderLayout.CENTER);
        this.add(jPanel1,   new XYConstraints(12, 9, 950, 76));
        jPanel1.add(jPanel2,   new XYConstraints(4, 0, 901, 56));
        jPanel2.add(jPanel3,  new XYConstraints(4, 0, -1, -1));
        jPanel2.add(jButton1, new XYConstraints(815, 25, 87, 25));
        jPanel2.add(jButton2, new XYConstraints(718, 25, 87, 25));
        jPanel2.add(jTextField3,   new XYConstraints(573, 19, 113, -1));
        jPanel2.add(jLabel1, new XYConstraints(16, 22, 67, 22));
        jPanel2.add(jLabel2, new XYConstraints(265, 21, 67, 22));
        jPanel2.add(jTextField2,  new XYConstraints(336, 20, 125, -1));
        jPanel2.add(jTextField1,  new XYConstraints(91, 21, 128, -1));
        jPanel2.add(jLabel4, new XYConstraints(491, 20, 67, 22));
      }
        public void setFrame(JFrame frame){
        this.frame = frame;
      }
      public static void main(String[] args){
      B0119Panel f=new B0119Panel();  }
      public void grd(){
      //grid1.setItems({"dfsaasdf","123456789123456789","dfsaf","affasdf","25.555","35.66"});
      String[] a={"ds", "32323", "gss", "25", "152", "55", "54", "888"};
     // grid1.setItems(a);
      }  void jbnPrint_actionPerformed(ActionEvent e) {
       grd();
      }
    }
      

  5.   

    可是ppxstar还是不对呀,
    请各位帮我看看