JDK-4710695 : JMenu focus listener change from 1.3 to 1.4
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2002-07-03
  • Updated: 2022-09-09
  • Resolved: 2022-09-09
Related Reports
Duplicate :  
Description
Name: dk106046			Date: 07/03/2002

java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)

and:

java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b13)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b13, mixed mode)


------------
Testcase is the one from Sun bug 4155181 (after modifying the 1.1.x
import statements for Swing and Accessibility classes).

Run the testcase and select the menus. Prior to 1.4.0, focusGained
events are fired for the menus, but with 1.4.0 onwards they are not.

This is because focus now goes to the JRootPane instead of the JMenu.
But no mention of such an incompatibility was found at:
http://java.sun.com/j2se/1.4/docs/api/java/awt/doc-files/FocusSpec.html

So if this is not fixed it should at least be a documented change. It
causes problems for various applications, particularly assistive
technologies which track the focus change.

======================================================================

Comments
EVALUATION Name: osR10079 Date: 07/15/2002 Looks like this is a duplicate of 4707457 (focusGained and focusLost methods under FcousListener in 1.4 do not work as 1.3). An so i reassign it to swing. BTW Focus Specification which is mentioned in the description contains AWT-level issues which are common for all AWT component. But this problem is Swing specific and it should not be included in this spec. ###@###.### July 15, 2002 ======================================================================
25-09-2004

WORK AROUND Name: dk106046 Date: 07/03/2002 Depends on the application, but using a MenuListener instead may be a workaround. ======================================================================
25-09-2004