With custom editors, some keys may select another cell during the
editing session. The editing session should be ended in this case.
2006-05-24 Audrius Meskauskas <[EMAIL PROTECTED]>
* javax/swing/JTable.java (valueChanged): If is editing, stop editing.
Index: JTable.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/JTable.java,v
retrieving revision 1.110
diff -u -r1.110 JTable.java
--- JTable.java 24 May 2006 06:05:27 -0000 1.110
+++ JTable.java 24 May 2006 07:02:42 -0000
@@ -2067,6 +2067,10 @@
*/
public void valueChanged (ListSelectionEvent event)
{
+ // If we are in the editing process, end the editing session.
+ if (isEditing())
+ editingStopped(null);
+
// Repaint the changed region.
int first = Math.max(0, Math.min(getRowCount() - 1, event.getFirstIndex()));
int last = Math.max(0, Math.min(getRowCount() - 1, event.getLastIndex()));