JDK-6281628 : REGRESSION: JInternalFrame misplaces focus after menu is closed by clicking inside of JInternalFrame
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-06-07
  • Updated: 2010-04-02
  • Resolved: 2005-08-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b46Fixed
Related Reports
Relates :  
Description
JInternalFrame transfers focus to the JRootPane after menu is closed by clicking on a JLabel inside the JInternalFrame. I have added debug info to the Component.requestFocusHelper() method and found that focus is being incorrectly set by method introduced by fix for bug 
4302764: focus is not set in JInternalFrame

To reproduce: compile and run attached program, click button 'Test button' (button should receive focus), open menu 'File' in JInternalFrame and then click on the 'Just a label...' JLabel inside the frame. This will close the menu but focus will not return to JButton. I've added focus monitor which repoorts how the keyboard focus is being transferred across the components to the console.
###@###.### 2005-06-07 15:40:28 GMT

Comments
EVALUATION Reproducible on build 1.6.0-ea-b40 and reproducible since build 1.6.0-ea-b34, which means it must have been introduced by the fix to "Bug 4302764 focus is not set in JInternalFrame". ###@###.### 2005-06-16 01:47:29 GMT Check for permanentFocusOwner property instead of focusOwner in FocusPropertyChangeListener. ###@###.### 2005-07-18 22:01:09 GMT
07-06-2005