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

Constructor DefaultTableModel(int,int) does not set number of columns.

XMLWordPrintable

    • sparc
    • solaris_2.5.1



      Name: aaC67449 Date: 02/25/98



      Constructor DefaultTableModel(int,int) does not set number of Column.

      -------------------Example-----------------------------------
      import java.awt.swing.table.*;
      public class Test {

         public static void main(String argv[]) {
         DefaultTableModel c = new DefaultTableModel(5,5);
           
              if(c.getColumnCount()!=5)
                  System.out.println("Failed. getColumnCount="+c.getColumnCount());
              else
                   System.out.println("OKAY");
             }

      }
      -------------------Output------------------------------------
      Failed. getColumnCount=0

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

            erapinsunw Eric Rapin (Inactive)
            aalievsunw Artem Aliev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: