Using latest Java 1.8.0_25 or Java 1.7.0_80 I'm seeing some odd behavior on
Max OSX 10.10 when using a retina laptop and an external monitor.

Using a simple test class that creates a JFrame with a JDialog like this:

public class TestMacWindows {
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                JFrame f = new JFrame("Main Frame");
                f.setSize(300,300);
                f.setLocation(100,100);
                f.setVisible(true);

                JDialog d = new JDialog(f, "Dialog");
                d.setSize(300,300);
                d.setLocation(500,100);
                d.setVisible(true);
            }
        });
    }
}

When you first run the class it will place both JFrame and JDialog
side-by-side on the primary monitor.

If you drag the JFrame window it moves the JDialog with it and if you drag
it so the JFrame is on one monitor but the JDialog is still on the other
monitor then the JDialog disappears completely.

It only happens when they are moving in-sync when dragging the JFrame.  If
you move the JDialog to another screen by just dragging the JDialog then
it's fine.

Besides the disappearing I've also see that if you:

1. Drag the JDialog to another monitor
2. Click back on the JFrame so it's in focus
3. Click back on the JDialog to focus it again

Then it will make the JDialog jump to a different location back on the
other monitor where the JFrame is.

Anybody else seeing this behavior or have a work around?

Thanks,
-Aj

Reply via email to