We should review all focus-related code in the
platform and collect information on how it is
being used. Everything should be updated to use
the JDK 1.4 focus manager natively. Should avoid
overriding methods to assign focus somewhere else,
etc., instead using higher-level methods which
declare which components can hold focus. Goals
should be better usage of 1.4 focus features,
simpler code, clear and publically documented
guidelines for new code, fewer bugs, better
portability to different window managers,
platforms, and L&Fs.
According to this I'd like to point out that problematic (I believe
wrong) is TopComponent.requestFocus() implementation (javadoc too)..
and I think it should be replaced by another method (e.g. activate)...
and requestFocus() to be left as it is (without adding another aspects
I prepared it that way on the branch winsys_29836, but it is an
Also there needs to be revised whether the TopComponent itself should
be not focusable (as it is now) which doesn't seem to be a problem
Because Window System v1 will not be supported from now by our team, all old
winsys issues (now "core/window system v1" issues) are going to be closed as
Changes in API which emerged both from UI spec
and problems with adjusting to the older API are described in the document
It shows also recommends how the client code should be adjusted to the new
If you think this issue apply also to the new winsys then change the
subcomponent (to "core/window system") and REOPEN it.
Definitely applies to new window system equally. Don't you guys look
at the summaries of the bugs you are closing WONTFIX?
New window system doesn't listen on focus events like it was in old
one. It also don't force (unless the infamous
TopComponent.requestFocus) any screwing of those methods. So I'd say
it is already jdk1.4 compliant.
Therefore I would leave this issue in old winsys.
However this issue spans more than just core/windows module.
Fair enough; marking as a general issue to encompass reviews,
documentation, fixes in whatever components need them, etc.
I'd go so far as to suggest doing a scan of all our sources for calls
to requestFocus and requestDefaultFocus, delete almost all of them and
see what breaks. With the exception of table cell editors and such, a
proper focus transfer policy should make such code completely unnecessary.
Re-assigning Tim's issues to Dafe.
Hmm, probably still makes sense. Any specific error scenarios left we are trying
to fix by this or is this just for fun? :-))
i found almost 600 usages of requestFocus() in netbeans sources which could be safely replaced with safer