-
Bug
-
Resolution: Won't Fix
-
P3
-
1.4.2
-
x86
-
windows_nt
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2172574 | 1.4-pool | Unassigned | P5 | Closed | Won't Fix |
Name: gm110360 Date: 04/16/2004
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
FULL OS VERSION :
Windows NT Version 4.0 ( Service Pack 6)
A DESCRIPTION OF THE PROBLEM :
Since JDK 1.4 method moveColumn of DefaultTabelColumnModel calls DefaultListSelectionModel.removeSelectionInterval, when unselected columns are moved in the DefaultTableColumnModel.
The DefaultListSelectionModel fires an event ValueChanged although no selection has really changed by the moveColumn operation.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start the application CustomJTable from the example beneath.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Method valueChanged of the ListSelectionListener should not be called.
ACTUAL -
Method valueChanged of the ListSelectionListener is called.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.JTable;
import javax.swing.table.*;
import javax.swing.event.*;
public class CustomJTable extends JTable {
public static void main (String[] args) {
CustomJTable table = new CustomJTable();
table.moveCol();
}
public void moveCol() {
TableColumnModel columnModel = new DefaultTableColumnModel();
TableColumn columnA = new TableColumn();
columnModel.addColumn(columnA);
TableColumn columnB = new TableColumn();
columnModel.addColumn(columnB);
setColumnModel(columnModel);
ListSelectionListener listener = this.new CustomListSelectionListener();
columnModel.getSelectionModel().addListSelectionListener(listener);
columnModel.moveColumn(0,1);
}
public class CustomListSelectionListener implements ListSelectionListener {
public void valueChanged(ListSelectionEvent e) {
System.out.println(e);
}
}
}
---------- END SOURCE ----------
Release Regression From : 1.3.1_11
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Incident Review ID: 193391)
======================================================================
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
FULL OS VERSION :
Windows NT Version 4.0 ( Service Pack 6)
A DESCRIPTION OF THE PROBLEM :
Since JDK 1.4 method moveColumn of DefaultTabelColumnModel calls DefaultListSelectionModel.removeSelectionInterval, when unselected columns are moved in the DefaultTableColumnModel.
The DefaultListSelectionModel fires an event ValueChanged although no selection has really changed by the moveColumn operation.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start the application CustomJTable from the example beneath.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Method valueChanged of the ListSelectionListener should not be called.
ACTUAL -
Method valueChanged of the ListSelectionListener is called.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.JTable;
import javax.swing.table.*;
import javax.swing.event.*;
public class CustomJTable extends JTable {
public static void main (String[] args) {
CustomJTable table = new CustomJTable();
table.moveCol();
}
public void moveCol() {
TableColumnModel columnModel = new DefaultTableColumnModel();
TableColumn columnA = new TableColumn();
columnModel.addColumn(columnA);
TableColumn columnB = new TableColumn();
columnModel.addColumn(columnB);
setColumnModel(columnModel);
ListSelectionListener listener = this.new CustomListSelectionListener();
columnModel.getSelectionModel().addListSelectionListener(listener);
columnModel.moveColumn(0,1);
}
public class CustomListSelectionListener implements ListSelectionListener {
public void valueChanged(ListSelectionEvent e) {
System.out.println(e);
}
}
}
---------- END SOURCE ----------
Release Regression From : 1.3.1_11
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Incident Review ID: 193391)
======================================================================
- backported by
-
JDK-2172574 REGRESSION: ListSelectionEvent thrown within DefaultTableColumnModel.moveColumn
-
- Closed
-
- relates to
-
JDK-6386677 ListSelectionEvent called on a table even when moving a column which does not have a selection on it
-
- Open
-