🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.gui
Article #60

JTable/JScollPane Arrow key handling, PgUp/PgDn

#60
From: Peter Meulmeester
Date: Thu, 08 Jul 1999 00:00
20 lines
1246 bytes
Hi,

I have a few JTables in a Window which must act as one whole. So no matter
which one has the "focus", I must react to navigation keys and adjust the
views of the JScrollPanes.

By using getRootPane().registerKey.....(KeyStroke.getKey....(VK_F1) ....
this all works fine. But note that I use the F1 function key here to drive
the
action. When I use the VK_LEFT or VK_ESCAPE key the keystroke
never reaches my code. I assume the the JTable/JScollPane which by chance
has the focus intercepts it.

How kan I prevent all the JTables/JScrollPanes from reacting to any key
events?

best regards,
Peter

focus intercepts it
Technical Details
Message-ID: <7m1lti$flg$1@thor.wirehub.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,f36f147351a7a335,start
X-Google-Attributes: gid111d45,public
X-Google-Thread: 10fd6d,f36f147351a7a335,start
X-Google-Attributes: gid10fd6d,public
From: "Peter Meulmeester" <pmeulm@wirehub.nl>
Subject: JTable/JScollPane Arrow key handling, PgUp/PgDn
Date: 1999/07/08
Message-ID: <7m1lti$flg$1@thor.wirehub.nl>
X-Deja-AN: 498473053
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Wirehub! Internet
X-MSMail-Priority: Normal
Newsgroups: comp.lang.java.gui,borland.public.jbuilder.java.swing