-
Bug
-
Resolution: Fixed
-
P3
-
7u4
-
b11
-
x86
-
os_x
-
Verified
Say, there's a frame F0 with an owned window. There's also a frame F1.
When F1 is active and the window is clicked it does receive focus, all the
focus/activation events generated are correct, though the frame F1 remains
natively active (has a highlighted title), while the frame F0 should actually
become such.
Here's the test case:
import java.awt.*;
import java.awt.event.*;
import java.awt.event.AWTEventListener;
public class Test {
public static void main(String[] args) {
Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
public void eventDispatched(AWTEvent e) {
System.err.println(e);
}
}, FocusEvent.FOCUS_EVENT_MASK |
WindowEvent.WINDOW_FOCUS_EVENT_MASK |
WindowEvent.WINDOW_EVENT_MASK);
Frame f0 = new Frame("f0");
Frame f1 = new Frame("f1");
Window w = new Window(f0);
Button b = new Button("button");
f0.setBounds(0, 0, 100, 100);
f1.setBounds(300, 0, 100, 100);
w.setBounds(0, 300, 100, 100);
w.add(b);
f1.setVisible(true);
f0.setVisible(true);
w.setVisible(true);
}
}
When F1 is active and the window is clicked it does receive focus, all the
focus/activation events generated are correct, though the frame F1 remains
natively active (has a highlighted title), while the frame F0 should actually
become such.
Here's the test case:
import java.awt.*;
import java.awt.event.*;
import java.awt.event.AWTEventListener;
public class Test {
public static void main(String[] args) {
Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
public void eventDispatched(AWTEvent e) {
System.err.println(e);
}
}, FocusEvent.FOCUS_EVENT_MASK |
WindowEvent.WINDOW_FOCUS_EVENT_MASK |
WindowEvent.WINDOW_EVENT_MASK);
Frame f0 = new Frame("f0");
Frame f1 = new Frame("f1");
Window w = new Window(f0);
Button b = new Button("button");
f0.setBounds(0, 0, 100, 100);
f1.setBounds(300, 0, 100, 100);
w.setBounds(0, 300, 100, 100);
w.add(b);
f1.setVisible(true);
f0.setVisible(true);
w.setVisible(true);
}
}
- relates to
-
JDK-7150345 [macosx] Can't type into applets at allstarpuzzles.com
-
- Closed
-