Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4243159

javax.swing.JTable() throws "ArrayIndexOutOfBoundsException: 0 >= 0"

XMLWordPrintable

    • beta
    • sparc
    • solaris_2.5.1



      Name: akC57697 Date: 06/02/99



      javax.swing.JTable() c-tor throws "ArrayIndexOutOfBoundsException: 0 >= 0"

      The javadoc says:
      "
      public JTable()

           Constructs a default JTable which is initialized with a default data model, a
           default column model, and a default selection model.
      "
      The example:
      ------------------------------------------------------------------------------------
      public class Test {
          public static void main(String[] argv) {
              Object o = new javax.swing.JTable();
              System.exit(0);
          }
      }
      ------------------------------------------------------------------------------------
      Output :
      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
      at java.util.Vector.elementAt(Vector.java:409)
      at javax.swing.table.DefaultTableColumnModel.getColumn(DefaultTableColumnModel.java:268)
      at javax.swing.JTable.getCellRect(JTable.java:1750)
      at javax.swing.JTable.valueChanged(JTable.java:2713)
      at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:149)
      at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:130)
      at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:176)
      at javax.swing.DefaultListSelectionModel.setAnchorSelectionIndex(DefaultListSelectionModel.java:526)
      at javax.swing.JTable.initializeLocalVars(JTable.java:3080)
      at javax.swing.JTable.<init>(JTable.java:364)
      at javax.swing.JTable.<init>(JTable.java:295)
      at Test.main(Test.java:3)
      (###@###.###): java -fullversion
      java full version "JDK-1.3-F"

      ======================================================================

            pmilnesunw Philip Milne (Inactive)
            akuzminorcl Alexander Kuzmin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: