Article View: borland.public.jbuilder.java.swing
Article #7872overwrite JTable cell.
From: Zachary Cooper
Date: Mon, 04 Dec 2000 00:00
Date: Mon, 04 Dec 2000 00:00
28 lines
1757 bytes
1757 bytes
I've added a FocusListener, ActionListener, and KeyListener to
a custom TableCellEditor and to my custom JTable, but I am only
able to do a selectAll() when I mouse-click in a cell. When I
mouse-click, the TableCellEditor gets a FocusEvent and I then
do a selectAll() which results in a overwrite when I begin to type.
I want the same thing to happen when I enter a new cell using a
key-press, but the new cell entered doesn't become highlighted
when I do a selectAll when entered...
> I want to do a selectall when a cell is entered in a JTable.
> A focusGained event registers when I mouse click in a
> cell, but if I change cells using a key press, the key press
> events register, but no change of focus that I can detect.
> Whay component should I be listening to?
Could you explain in a little bit more detail what you are doing? What
listeners do you add to what components? It sounds like you must be
adding a listener to a TableCellEditor, but it is hard to tell since
you do not even mention a TableCellEditor.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<3a2c09c3$1_2@dnews>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,c575b74c2bce15b4,start X-Google-Attributes: gid111d45,public From: "Zachary Cooper" <ztc@bigfoot.com> Subject: overwrite JTable cell. Date: 2000/12/04 Message-ID: <3a2c09c3$1_2@dnews> X-Deja-AN: 701099548 X-Trace: 4 Dec 2000 13:16:51 -0800, 151.202.82.123 X-MSMail-Priority: Normal X-Priority: 3 Reply-To: "Zachary Cooper" <ztc@bigfoot.com> Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400