mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8202702: Clearing selection on JTable causes disappearance of a row
Reviewed-by: serb
This commit is contained in:
parent
7000581e0b
commit
bb9fed1008
2 changed files with 200 additions and 1 deletions
|
@ -1872,7 +1872,12 @@ public class BasicTableUI extends TableUI
|
|||
// and if there is any selected rows
|
||||
if (rMax != (table.getRowCount() - 1) &&
|
||||
(table.getSelectedRow() == -1)) {
|
||||
rMax = rMax - 1;
|
||||
// Do not decrement rMax if rMax becomes
|
||||
// less than or equal to rMin
|
||||
// else cells will not be painted
|
||||
if (rMax - rMin > 1) {
|
||||
rMax = rMax - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue