<Swing Dev> May Component.isFocusOwner() be called by non-edt threads?
chrriis at gmail.com
Tue Nov 1 05:56:43 PDT 2011
> Of course all Swing methods (if javadoc doesn't say the opposite) must be
> called from EDT thread.
Which makes me remember that I recently received a bug report from
someone using the Java Access Bridge (JAB).
The bug is that JAB calls "Component.isFocusOwner()" outside of the
EDT but my component enforces correct threading calls. Because the
Javadoc does not say that it can be called from outside the EDT, I
throw an exception on that call (or rather, in
I don't know much about JAB, but the user seemed to imply he did not
create the JAB thread so I assume JAB did it.
My question: is it allow to call "Component.isFocusOwner()" or
"Component.hasFocus()" outside the EDT? If it is the case, shouldn't
the Javadoc say so?
More information about the swing-dev