src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java
changeset 51908 3ba3d39b91c7
parent 47216 71c04702a3d5
equal deleted inserted replaced
51907:6f08e6011e7e 51908:3ba3d39b91c7
  1870             // when there is no scrollPane and we do printing of table
  1870             // when there is no scrollPane and we do printing of table
  1871             // but not when rmax is already pointing to index of last row
  1871             // but not when rmax is already pointing to index of last row
  1872             // and if there is any selected rows
  1872             // and if there is any selected rows
  1873             if (rMax != (table.getRowCount() - 1) &&
  1873             if (rMax != (table.getRowCount() - 1) &&
  1874                     (table.getSelectedRow() == -1)) {
  1874                     (table.getSelectedRow() == -1)) {
  1875                 rMax = rMax - 1;
  1875                 // Do not decrement rMax if rMax becomes
       
  1876                 // less than or equal to rMin
       
  1877                 // else cells will not be painted
       
  1878                 if (rMax - rMin > 1) {
       
  1879                     rMax = rMax - 1;
       
  1880                 }
  1876             }
  1881             }
  1877         }
  1882         }
  1878 
  1883 
  1879         // Paint the grid.
  1884         // Paint the grid.
  1880         paintGrid(g, rMin, rMax, cMin, cMax);
  1885         paintGrid(g, rMin, rMax, cMin, cMax);