Index: javax/swing/JTable.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JTable.java,v retrieving revision 1.45 diff -u -r1.45 JTable.java --- javax/swing/JTable.java 12 Sep 2005 12:31:40 -0000 1.45 +++ javax/swing/JTable.java 12 Sep 2005 18:52:55 -0000 @@ -1017,10 +1017,7 @@ int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) - { - x += columnModel.getColumn(i).getWidth(); - x += x_gap; - } + x += columnModel.getColumn(i).getWidth(); if (includeSpacing) return new Rectangle(x, y, width, height); @@ -2303,6 +2300,7 @@ { TableColumn column = new TableColumn(c); column.setIdentifier(dataModel.getColumnName(c)); + column.setHeaderValue(dataModel.getColumnName(c)); columnModel.addColumn(column); column.addPropertyChangeListener(tableColumnPropertyChangeHandler); } Index: javax/swing/plaf/basic/BasicTableUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTableUI.java,v retrieving revision 1.25 diff -u -r1.25 BasicTableUI.java --- javax/swing/plaf/basic/BasicTableUI.java 31 Aug 2005 18:54:47 -0000 1.25 +++ javax/swing/plaf/basic/BasicTableUI.java 12 Sep 2005 18:52:56 -0000 @@ -1030,12 +1030,8 @@ gfx.translate(-x, -y); } y += height; - if (gap != null) - y += gap.height; } x += width; - if (gap != null) - x += gap.width; } // tighten up the x and y max bounds @@ -1053,10 +1049,8 @@ boolean paintedLine = false; for (int c = 0; c < ncols && x < xmax; ++c) { - x += cols.getColumn(c).getWidth();; - if (gap != null) - x += gap.width; - gfx.drawLine(x, y0, x, ymax); + x += cols.getColumn(c).getWidth(); + gfx.drawLine(x - gap.width, y0, x - gap.width, ymax); paintedLine = true; } gfx.setColor(save); @@ -1072,8 +1066,6 @@ for (int r = 0; r < nrows && y < ymax; ++r) { y += height; - if (gap != null) - y += gap.height; gfx.drawLine(x0, y, xmax, y); paintedLine = true; }