J2SE Version (please include all output from java -version flag):
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
No
Operating System Configuration Information (be specific):
Microsoft Windows 2000 [Version 5.00.2195]
Modal Internal Frames are broken in 1.6
Opening a Modal Internal Frame from a Modal Internal Frame into a different Window than the original is causing Mouse Events not to be dispatched.
1) Run Code
(Two Frames with just buttons at the bottom should appear)
2) On the left Frame click on the 'Show Message in this Frame' button
(A dialog should appear in the left Frame and the right Frame should remain empty)
3) On the left Frame click on the 'Show Message in other Frame' button
(Now a dialog should appear in the right Frame with the text 'Test' and the other dialog should remain in the left Frame)
4) Observe that clicking OK with the Mouse no longer works (using the enter key still works)
import static java.awt.BorderLayout.*;
import static javax.swing.JFrame.*;
import static javax.swing.JOptionPane.*;
import java.awt.event.*;
import javax.swing.*;
public class Test {
public static void main(String[] args) {
final JDesktopPane desktop1 = new JDesktopPane();
final JDesktopPane desktop2 = new JDesktopPane();
JFrame frame1 = new JFrame("Frame 1");
frame1.add(desktop1);
frame1.add(new JButton(new AbstractAction("Show Message in this Frame") {
public void actionPerformed(ActionEvent anEvent) {
showInternalMessageDialog(desktop1, new JButton(new AbstractAction(
"Show Message in other Frame") {
public void actionPerformed(ActionEvent anEvent) {
showInternalMessageDialog(desktop2, "Test");
}
}));
}
}), SOUTH);
frame1.setDefaultCloseOperation(EXIT_ON_CLOSE);
frame1.setBounds(50, 50, 300, 300);
frame1.setVisible(true);
JFrame frame2 = new JFrame("Frame 2");
frame2.add(desktop2);
frame2.add(new JButton(new AbstractAction("Show Message in this Frame") {
public void actionPerformed(ActionEvent anEvent) {
showInternalMessageDialog(desktop2, new JButton(new AbstractAction(
"Show Message in other Frame") {
public void actionPerformed(ActionEvent anEvent) {
showInternalMessageDialog(desktop1, "Test");
}
}));
}
}), SOUTH);
frame2.setDefaultCloseOperation(EXIT_ON_CLOSE);
frame2.setBounds(400, 50, 300, 300);
frame2.setVisible(true);
}
}