JDK-6301807 : MToolkit: Window shown before its owner is not focusable
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: generic
  • CPU: generic
  • Submitted: 2005-07-26
  • Updated: 2011-07-01
  • Resolved: 2011-07-01
Related Reports
Relates :  
Description
On MToolkit a Window shown before its decorated owner is not focusable.
The bug may be reproduced with the following testcase:

import java.awt.*;
import java.awt.event.*;

public class WindowTest {
    static Frame frame = new Frame();
    static Window window = new Window(frame);		
    static TextField textfield = new TextField();

    public static void main(String[] args) {
	frame.setSize(100, 100);

	window.add(textfield, BorderLayout.NORTH);
	window.setBounds(0, 200, 200, 200);

	window.setVisible(true);
	frame.setVisible(true);
    }
}

Compile and run the test on MToolkit. You will see a Window with a TextField and a Frame
appeared. Try to type in the TextField. If no text can be input the bug is reproduced.

Comments
EVALUATION MToolkit-specific bug, so it's not reproducible in JDK7 and later JDK releases.
01-07-2011

WORK AROUND Show an owner first, then its childs Windows.
27-07-2005

EVALUATION The bug is reproduced since Mustang b24.
26-07-2005