How can I determine the currently-focused component?

Scott Stanchfield

Prior to Java 2, v1.4, unless you happened to be listening to the component for it's focusGained, you couldn't.

In Java 2, v1.4, you can ask for it using the updated focus architecture. You can find details at http://java.sun.com/j2se/1.4/docs/api/java/awt/doc-files/FocusSpec.html.

About | Sitemap | Contact