When I fixed issue #28351 I found another bug
specific to JDK 1.4 (reproducible on JDK 1.4.1_01,
1.4.2_b10). When popup is invoked on tab focus is
incorrectly transferred to another component.
Steps to reproduce:
1.Start IDE in MDI.
2.Open 1 source (README.txt) in left area in
3.Open 2 source (java files) in center area in
4.Make sure one java source is focused (you see
cursor inside text).
5.Invoke popup on second tab in center area
(second java source).
6.Popup is shown but focus is now inside README
It happens only on JDK 1.4 not on JDK 1.3.1. I
investigated it and it is caused by
FocusTraversalPolicy of InternalFrameTypeImpl.
When JTabbedPane is validated on calls
requestDefaultFocus() and FocusTraversalPolicy is
responsible for returning correct default
component however in this case it returns
Solution would be to overwrite
Problem is that this focus handling is introduced
since JDK 1.4. It means that fix would require a
lot of ugly code. Should we fix it anyway?
Created attachment 8519 [details]
Call stack when requestFocus() is called
Thing is worse: It is enough to just select second tab in pane by left
mouse click. No need to invoke popup. So to focus second component in
center pane you must select tab and then click again inside pane.
I have reproduced it, significant is to invoke popup menu by
right-click on the another than already selected tab, because if you
invoke popup menu on selected tab it woks fine.
Leaving this for Marek for now.
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.
it works fine now ,
verified in [nb_dev](200402151900)