🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages Started by Steve Mon, 22 Dec 2003 00:56
Detect Cell Editing in JTable
#1415
Author: Steve
Date: Mon, 22 Dec 2003 00:56
13 lines
1448 bytes
I would like to detect when editing _begins_ in a table cell. Unfortunately,
the CellEditor only fires events on stop or cancel editing.

I tried  the following with no luck:

1. Create a JdbTextField and register a listener on focusGained.
2. Create DefaultCellEditor, passing the JdbTextField to the constructor.
3. Call setItemEditor to the DefaultCellEditor for the Column in question.

As far as I can tell, the event never fires. Is this the right approach? Any
other ideas? TIA.

-Steve
Re: Detect Cell Editing in JTable
#1416
Author: Steve
Date: Mon, 22 Dec 2003 02:40
27 lines
1853 bytes
Ok, I've refined the problem a bit. The event _is_ firing when editing is
started by double-clicking on the cell. However if editing is starting by
typing, then the event does not fire. How strange is that?

Basically all I'm trying to do is to call selectAll when editing begins.
Seems like it should be a pretty simple thing to do.


"Steve" <pearsons_11113@mindspring.com> wrote in message
news:3fe6413e$1@newsgroups.borland.com...
> I would like to detect when editing _begins_ in a table cell.
Unfortunately,
> the CellEditor only fires events on stop or cancel editing.
>
> I tried  the following with no luck:
>
> 1. Create a JdbTextField and register a listener on focusGained.
> 2. Create DefaultCellEditor, passing the JdbTextField to the constructor.
> 3. Call setItemEditor to the DefaultCellEditor for the Column in question.
>
> As far as I can tell, the event never fires. Is this the right approach?
Any
> other ideas? TIA.
>
> -Steve
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads