4330950: Lost newly entered data in the cell when resizing column width
Reviewed-by: peterz
This commit is contained in:
parent
76501ba258
commit
1c45f6db9e
@ -4574,9 +4574,8 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
* @see TableColumnModelListener
|
||||
*/
|
||||
public void columnMoved(TableColumnModelEvent e) {
|
||||
// If I'm currently editing, then I should stop editing
|
||||
if (isEditing()) {
|
||||
removeEditor();
|
||||
if (isEditing() && !getCellEditor().stopCellEditing()) {
|
||||
getCellEditor().cancelCellEditing();
|
||||
}
|
||||
repaint();
|
||||
}
|
||||
@ -4593,8 +4592,8 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
* @see TableColumnModelListener
|
||||
*/
|
||||
public void columnMarginChanged(ChangeEvent e) {
|
||||
if (isEditing()) {
|
||||
removeEditor();
|
||||
if (isEditing() && !getCellEditor().stopCellEditing()) {
|
||||
getCellEditor().cancelCellEditing();
|
||||
}
|
||||
TableColumn resizingColumn = getResizingColumn();
|
||||
// Need to do this here, before the parent's
|
||||
|
Loading…
Reference in New Issue
Block a user