JDK-4395074 : Accelerators and mnemonics do not work when a heavyweight component is present.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.2
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2000-12-05
  • Updated: 2000-12-05
  • Resolved: 2000-12-05
Related Reports
Duplicate :  
Relates :  
Description
In a JDialog (or JFrame) with a menubar, mnemonics and accelerators stop 
working when you add a heavyweight component to the content pane.  

I am aware that mixing heavyweight and lightweight components is not 
particularly recommended, but there are situations where this is unavoidable,
such as in our case where we get a Component from JMF.

Attached is an test program showing this behavior.

Comments
WORK AROUND stuart.findlay@ireland 2001-02-09 I have a workaround for this bug - see TestFrame_Workaround.java in the attachments. The lightweight component passes the keyEvent to the parent. Obviously in the lightweight needs to see any key events it will have to test for these before passing up to the parent.
11-06-2004

EVALUATION This is a duplicate of 4344900, refer to it for more details. scott.violet@eng 2000-12-05
05-12-2000