-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.2fcs
-
sparc
-
solaris_2.6
-
Verified
Name: akC57697 Date: 12/08/97
The java.awt.swing.JTable selection does not work properly.
JTable.getSelectedRowCount() may returns value > then
JTable.getRowCount().
--------------8-<-----------------------------------
import java.awt.swing.JTable;
import java.awt.swing.table.*;
public class JTableBug {
public static void main(String s[]) {
String data[][] = {{"1","2","3"},{"4","5","6"}};
String col[] = {"1","2","3"};
JTable c = new JTable(data,col); // The simple table
c.setRowSelectionInterval(1,1); // Set initial selection
c.selectAll(); // Select all
System.out.println(c.getSelectedRowCount());
System.out.println(c.getRowCount());
System.out.println(c.getSelectedRowCount()c.getRowCount()); //!!
System.exit(0);
}
}
--------------8-<-----------------------------------
The output is:
(novo35 60): java JTableBug
3
2
true
(novo35 61): java -fullversion
java full version "JDK-1.2beta2-Y"
======================================================================