This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[orion](020510-rc2), [jdk1.4](fcs) Solaris 5.8 && Solaris 5.9 Steps to reproduce: - run IDE in MDI - press Alt-T | W -> Setup Wizard arise - press Enter (go to Module Inspallation panel) -> try to traverse by keyboard (press Tab) in the list of modules and categories -> it's impossible! You cannot focus nothing by keyboard until you click mouse inside Setup window.
Yes confirmed. Not specific to Solaris. I saw it on Linux RH 7.1, KDE 2.1.1 too.
Evaluation: It is nasty bug. On JDK 1.4.0 we use Container.transferFocusDownCycle() to focus component in dialog. It calls FocusTraversalPolicy.getDefaultComponent() and then requestFocus() is called on this default component. Unfortunately when ModuleSelectionPanel is displayed for the first time FocusTraversalPolicy returns javax.swing.JScrollPane$ScrollBar. When you switch back and forward it then returns always org.openide.explorer.view.TreeTable which is correct in our case. (Actually javax.swing.LayoutFocusTraversalPolicy is used in our container NbDialog and getDefaultComponent() is translated to getFirstComponent().) I have no idea why it happens. All components are already in AWT hierarchy (addNotify()) was called). Component should be sorted from top left line by line to bottom right. Solution would be to overwrite default FocusTraversalPolicy.getDefaultComponent() for SetupWizard. However it is possible only for JDK 1.4.0 and newer, not supported in JDK 1.3.1 and older. It results in ugly code.
I found that FOCUS_GAINED event is received for scrollbar component which is not visible already. Not sure if that can cause problem. Workaround is to requestFocus() on any visible component in the same parent => wizard stays accessible using keyboard.
When second panel ModuleSelectionPanel is displayed for the first time (regardless if user presses Enter or click on Next in previous panel) scrollbar is focused. This scrollbar is not visible when it receives focus (when my listener receives FOCUS_GAINED event for this component). I do not know exactly why but from that moment all key events has no effect. (User can click by mouse anywhere to transfer focus to any other components and it starts to work fine. If you switch back to previous panel using mouse and forward to ModuleSelectionPanel it works fine too.) Only programmatical workaround I found is to check focus events when SetupWizard is displayed and if FOCUS_GAINED event is received for non visible component it tries to request focus for another visible component of the same parent. It solves this problem because there is visible TreeTable. This should not break anything. If no visible component is found in the same parent nothing happens.
Fixed in main trunk as described above: Try to transfer focus to any visible component of the same parent when invisible component is focused. Modified: core/src/org/netbeans/core/ui/SetupWizard.java r.1.10
verified in [nb_dev](20021009)
Resolved for 3.4.x or earlier, no new info since then -> closing.