Article View: borland.public.jbuilder.java.swing
Article #9595Re: A customized TableCellEditor in a JTable does not work!
From: John P. McGrath
Date: Fri, 03 Mar 2000 00:00
Date: Fri, 03 Mar 2000 00:00
31 lines
1602 bytes
1602 bytes
On Thu, 02 Mar 2000 17:25:32 +0100, Martin Dahlem wrote: > Now I can be more specific: > The correct TableCellEditor is used > and the correct TableCellEditor's > Component is used, the only thing what is wrong: > > I do not get any key-event until I click into the tablecell!!! > > I added a DocumentListener to my TableCellEditor's > Component: this works fine!! > > If you know a way to make the TableCellEditor's > Component's KeyListener to receive the keyevents without > using the mouse before, I will be happy to get > your answer! If I understand you correctly, you want to recognize when the user changes the current cell to a specific cell, so you can fire up the TableCellEditor, which creates the TableCellEditor component. If that is the case, then it cannot be the TableCellEditor Component that recognizes the keystroke, since it has not been realized at that point. My guess is that you will need to add a listener to the JTable itself to accomplish this. -- John P. McGrath <JPMcGrath@fast.net> <jpm@nscs.fast.net>
Technical Details
Message-ID:
<MPG.13292f68a9712109897d7@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38BE5FF0.AA2904CD@germany.ncr.com> <38BE95FC.A8844966@germany.ncr.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,6edbc71d4b1ba6ae X-Google-Attributes: gid111d45,public From: John P. McGrath <JPMcGrath@fast.net> Subject: Re: A customized TableCellEditor in a JTable does not work! Date: 2000/03/03 Message-ID: <MPG.13292f68a9712109897d7@forums.borland.com> X-Deja-AN: 592918869 References: <38BE5FF0.AA2904CD@germany.ncr.com> <38BE95FC.A8844966@germany.ncr.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing