Article View: borland.public.jbuilder.java.swing
Article #11758How do you know which component in your UI has focus?
From: Jeroen Zwartepoorte
Date: Mon, 12 Apr 1999 00:00
Date: Mon, 12 Apr 1999 00:00
16 lines
1143 bytes
1143 bytes
I want to put some functionality behind my Edit->Cut/Copy/Paste/Undo/Redo etc. menuitems. Before i can do that, i need to know which component in my user-interface has the current focus. I was hoping i could use some kind of Swing mechanism for determining that. (i know how to do it using java.awt.event.FocusListener, but you have to add a FocusListener to EVERY UI component. That's NOT something i want to do for some simple cut/copy/paste functionality). Can anybody perhaps help me with extending FocusManager or using SwingUtilities? Any help is greatly appreciated, Jeroen Zwartepoorte
Technical Details
Message-ID:
<7etgds$bs410@forums.borland.com>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,b5851180238adda1,start X-Google-Attributes: gid111d45,public From: "Jeroen Zwartepoorte" <Jeroen@xs4all.nl> Subject: How do you know which component in your UI has focus? Date: 1999/04/12 Message-ID: <7etgds$bs410@forums.borland.com> X-Deja-AN: 465578558 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing