Re: JTable editor doesn't stop the first time
From: JavaGuru (hilizbabe_at_yahoo.com)
Date: 10/21/03
- Next message: JavaGuru: "Re: JTable Selection Sorting"
- Previous message: JavaGuru: "Re: Printing a JTable / Component"
- In reply to: Carlo Bamberg: "JTable editor doesn't stop the first time"
- Next in thread: Christian Kaufhold: "Re: JTable editor doesn't stop the first time"
- Reply: Christian Kaufhold: "Re: JTable editor doesn't stop the first time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Oct 2003 14:55:19 -0700
Sometimes its very difficult to implement the simplest thing in
JTable.
use QuickTable(http://dbtable.hypermart.net), a free JTable grid
control, which is built on top of JTable. It handles the
updates/inserts/deletes automatically once the cell content is
changed.
Good Luck,
Liz
carlo.bamberg@pch.etat.lu (Carlo Bamberg) wrote in message news:<7c59172b.0310152317.5f442821@posting.google.com>...
> 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: JavaGuru: "Re: JTable Selection Sorting"
- Previous message: JavaGuru: "Re: Printing a JTable / Component"
- In reply to: Carlo Bamberg: "JTable editor doesn't stop the first time"
- Next in thread: Christian Kaufhold: "Re: JTable editor doesn't stop the first time"
- Reply: Christian Kaufhold: "Re: JTable editor doesn't stop the first time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|