JTable editor doesn't stop the first time
From: Carlo Bamberg (carlo.bamberg_at_pch.etat.lu)
Date: 10/16/03
- Next message: Christian Wenz: "KeyAdapter TAB"
- Previous message: Roedy Green: "Re: Making a Label behave like a button"
- Next in thread: Kleopatra: "Re: JTable editor doesn't stop the first time"
- Reply: Kleopatra: "Re: JTable editor doesn't stop the first time"
- Reply: JavaGuru: "Re: JTable editor doesn't stop the first time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 Oct 2003 00:17:55 -0700
I wrote the following lines to have the celleditor in a JTable stop
DefaultCellEditor editor =(DefaultCellEditor)table.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
if (table.isEditing())
editor.cancelCellEditing();
}
This shall make sure that the editing of the current cell stops before
I create my select statement or update statement for the database. I
works fine, except for the first time. (I modify a date in the table
and save it, no modification on the database. I modify the date a
second time and save it, now it works. And from now on it works as
long as I don't quit the application.)
Any ideas why?
- Carlo Bamberg
- Next message: Christian Wenz: "KeyAdapter TAB"
- Previous message: Roedy Green: "Re: Making a Label behave like a button"
- Next in thread: Kleopatra: "Re: JTable editor doesn't stop the first time"
- Reply: Kleopatra: "Re: JTable editor doesn't stop the first time"
- Reply: JavaGuru: "Re: JTable editor doesn't stop the first time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]