-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.1.2, 1.1.8_003
-
generic, sparc
-
generic, solaris_2.5
Calling requestFocus() on a Frame after all the components have been added to
it and the frame is visible does not give the frame the focus. HJ browser uses
EditorFrame which is an extension of Frame. At the end of initFrame(), we do
a requestFocus(). When we check for FocusOwner via the getFocusOwner() call,
we get back null. This implies that keyEvents are not propogated to the frame
correctly. I also tried to use windowActivated() from the WindowEvent
as well as componentShowing() of the ComponentEvent to use as entry
points for requestFocus, with no success.
I notice that a piece of code in Window.java is commented out for handling the WindowEvent.ACTIVATED. There is some mention of this messing up focus
on solaris.
As a workaround in our HJ code, I now force the textfield to have focus. The
EditorFrame needs to have focus assigned to it as users might use action keys as soon as the frame comes up (eg: PAGEUP, PAGEDOWN ...)
it and the frame is visible does not give the frame the focus. HJ browser uses
EditorFrame which is an extension of Frame. At the end of initFrame(), we do
a requestFocus(). When we check for FocusOwner via the getFocusOwner() call,
we get back null. This implies that keyEvents are not propogated to the frame
correctly. I also tried to use windowActivated() from the WindowEvent
as well as componentShowing() of the ComponentEvent to use as entry
points for requestFocus, with no success.
I notice that a piece of code in Window.java is commented out for handling the WindowEvent.ACTIVATED. There is some mention of this messing up focus
on solaris.
As a workaround in our HJ code, I now force the textfield to have focus. The
EditorFrame needs to have focus assigned to it as users might use action keys as soon as the frame comes up (eg: PAGEUP, PAGEDOWN ...)
- duplicates
-
JDK-4056723 requestFocus() on a frame does not work
- Closed