src/share/classes/javax/swing/plaf/basic/BasicTableUI.java

Print this page

        

*** 1708,1720 **** * row height times the number of rows. * The minimum width is the sum of the minimum widths of each column. */ public Dimension getMinimumSize(JComponent c) { long width = 0; ! Enumeration enumeration = table.getColumnModel().getColumns(); while (enumeration.hasMoreElements()) { ! TableColumn aColumn = (TableColumn)enumeration.nextElement(); width = width + aColumn.getMinWidth(); } return createTableSize(width); } --- 1708,1720 ---- * row height times the number of rows. * The minimum width is the sum of the minimum widths of each column. */ public Dimension getMinimumSize(JComponent c) { long width = 0; ! Enumeration<TableColumn> enumeration = table.getColumnModel().getColumns(); while (enumeration.hasMoreElements()) { ! TableColumn aColumn = enumeration.nextElement(); width = width + aColumn.getMinWidth(); } return createTableSize(width); }
*** 1723,1735 **** * row height times the number of rows. * The preferred width is the sum of the preferred widths of each column. */ public Dimension getPreferredSize(JComponent c) { long width = 0; ! Enumeration enumeration = table.getColumnModel().getColumns(); while (enumeration.hasMoreElements()) { ! TableColumn aColumn = (TableColumn)enumeration.nextElement(); width = width + aColumn.getPreferredWidth(); } return createTableSize(width); } --- 1723,1735 ---- * row height times the number of rows. * The preferred width is the sum of the preferred widths of each column. */ public Dimension getPreferredSize(JComponent c) { long width = 0; ! Enumeration<TableColumn> enumeration = table.getColumnModel().getColumns(); while (enumeration.hasMoreElements()) { ! TableColumn aColumn = enumeration.nextElement(); width = width + aColumn.getPreferredWidth(); } return createTableSize(width); }
*** 1738,1750 **** * row heighttimes the number of rows. * The maximum width is the sum of the maximum widths of each column. */ public Dimension getMaximumSize(JComponent c) { long width = 0; ! Enumeration enumeration = table.getColumnModel().getColumns(); while (enumeration.hasMoreElements()) { ! TableColumn aColumn = (TableColumn)enumeration.nextElement(); width = width + aColumn.getMaxWidth(); } return createTableSize(width); } --- 1738,1750 ---- * row heighttimes the number of rows. * The maximum width is the sum of the maximum widths of each column. */ public Dimension getMaximumSize(JComponent c) { long width = 0; ! Enumeration<TableColumn> enumeration = table.getColumnModel().getColumns(); while (enumeration.hasMoreElements()) { ! TableColumn aColumn = enumeration.nextElement(); width = width + aColumn.getMaxWidth(); } return createTableSize(width); }