JDK-4321997 : disabled button gains focus when requestFocus() is invoked on disabled button
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-03-15
  • Updated: 2001-06-27
  • Resolved: 2001-04-18
Related Reports
Duplicate :  
Description
Disabled button gains focus when requestFocus() method is called.This bug is only in button( both heavy weight and light weight),it is not producible in other components.

Operating Systems:Windows and Solaris

To Reproduce --> Run the sample code with the awtsqe.jar set in the classpath.  - Type any key while the program is runnning.
- You would notice that the key events are triggered on the disabled button( The keys are printed at the terminal).
- This can be tested for AWT Button by uncommenting the Button declaration and commenting the LWButton declaration.

Comments
EVALUATION This is Not a Bug. Disabled Components can become the focus owner. This is a special case of the focus specification. The Component should not receive any KeyEvents, however. I'll keep this bug open until we have the new focus implementation and specification in place. In the meantime, the test case against which this bug was filed should be fixed. david.mendenhall@eng 2000-03-15 Name: dkR10074 Date: 10/27/2000 ###@###.### 2000-10-27 SunOS_sparc promoted b34 - FAILED promoted b35 - PASSED promoted b36 - PASSED Windows_NT_x86 promoted b34 - FAILED promoted b35 - PASSED promoted b36 - PASSED ====================================================================== Based on the above results, I am closing this bug as being fixed by the merlin focus project. hania.gajewska@Eng 2001-04-17
17-04-2001