JDK-6185062 : Disabling a frame does not prevent the button in it from being responsive to key events, win32
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.1
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-10-27
  • Updated: 2005-10-04
  • Resolved: 2005-10-04
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
I have a frame with a button. On clicking the button, I am disabling the frame. After that, the focus still stays with the button and button responds to all the key events. Say pressing a space bar triggers an action event for the button. But button is not clickable using mouse. This behavior is seen only on Win32. On Solaris / Linux, the button also gets disabled and hence does not respond to any keyevents when parent frame gets disabled.

This is reproducible on all releases (at least since 1.3.1) only on Win32.

I have attached a sample test. Run the sample text on WinXP. You would see a frame with a button. Click on the button. Frame gets disabled. Make sure button still has the focus. Press space bar. If an action event is triggered (watch the console) the bug is reproduced.
###@###.### 10/27/04 09:10 GMT

Comments
EVALUATION This is in fact not a literal duplicate of 5044469, but the suggested fix will also cover this behavior, so closing as a duplicate.
04-10-2005

EVALUATION 5044469 deals with related problem on Windows. An attempt to fix it by creating a stub in Toolkit cause regressions related with event re-targeting on Menu components. ###@###.### 2005-06-20 15:38:24 GMT
20-06-2005