🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1785

JTable & Key event

#1785
From: Erwin
Date: Tue, 22 Jul 2003 13:13
27 lines
2138 bytes
Hi

I'm having a problem with the use of JTable.

I want to response to key event myself. On itself no problem. I wrote my own
JTable with its processKeyEvent(KeyEvent e) method in wich I reactie to the
key event (in this case to ENTER). This works as long as I have selected a
cell (you see that the cell is selected, but there's no cursor). But when I
click to go into the cell (now the cursor is visible in the cell) and I
press ENTER first the key event of Component is done. After he has done the
event of component he goes into my processKeyEvent(KeyEvent e) and does what
is written there. But because he allready performed the actions of the key
event in Component, the result is not what I wanted.

Can I prevent the key event of component from being processed???

In simple terms said: what I want to achieve is that hitting the ENTER key
makes the cursor go to the cell in the next column instead of going to the
cell in the next row (or first row of next column when being on the last
row)...

Can anybody help me??? It would be nice to know where to find all the info I
need...

Many thanks in advance,
Erwin Olaerts
erwin.olaerts@xtenditsolutions.com
Technical Details
Message-ID: <3f1d37cb$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!skynet.be!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,7c0cdb9e1204a686,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2003-07-22 06:41:19 PST
From: "Erwin" <erwin.olaerts@xtenditsolutions.com>
Newsgroups: borland.public.jbuilder.java.swing
Subject: JTable & Key event
Date: Tue, 22 Jul 2003 15:13:11 +0200
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 212.239.181.226
Message-ID: <3f1d37cb$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1058879435 212.239.181.226 (22 Jul 2003 06:10:35 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!skynet.be!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail