错误提示是什么啊?或者你的源代码呢?再或者错误的环境呢?

解决方案 »

  1.   

    TableModel dataModel = new AbstractTableModel() {
              public int getColumnCount() { return 10; }
              public int getRowCount() { return 10;}
              public Object getValueAt(int row, int col) { return new Integer(row*col); }
          };
          JTable table = new JTable(dataModel);
          JScrollPane scrollpane = new JScrollPane(table);
          setVisible(true);