Re: JTable editor doesn't stop the first time

From: JavaGuru (hilizbabe_at_yahoo.com)
Date: 10/21/03


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



Relevant Pages

  • JTable editor doesnt stop the first time
    ... I create my select statement or update statement for the database. ... except for the first time. ... (I modify a date in the table ...
    (comp.lang.java.gui)
  • Re: JTable editor doesnt stop the first time
    ... > I create my select statement or update statement for the database. ... except for the first time. ... (I modify a date in the table ... Update if you can (since 1.4.1 JTable will stop editing ...
    (comp.lang.java.gui)
  • Re: Updating only fields which users have changed
    ... >> Thanks everyone for the responses. ... >> building a UPDATE statement of only the fields that have actually ... >> changed probably won't save much on the database end. ... > Yes there will be savings, but I regard it to be a case of premature ...
    (comp.lang.php)
  • Re: Shared v. Exclusive Access
    ... Control Panel, Add/remove programs, find Adobe, click Modify -> create Adobe ... The folder wherein the frontend resides grants Full permissions to the ... When I open the database, however, I don't get the message boxes. ...
    (microsoft.public.access.security)
  • Re: What is wrong or missing if I cant modefy an exisiting workgroup?
    ... 1)I wasn't able to remove admins group form User Admin. ... database and managed to modify the existing newsystem.dmw. ... Allthough I found an application that had security ...
    (microsoft.public.access.security)