-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
9
-
os_x
Only on OS X the JFrame jumps to another monitor on zoom if setMaximizedBounds() is used.
Need 2 monitors to reproduce.
Compile and run the following application that shows a frame.
FrameJumpingTest.java
import javax.swing.*;
import java.awt.*;
public class FrameJumpingTest {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
JFrame frame = new JFrame("Frame Jumping Test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setBounds(0, 0, 200, 200);
frame.setMaximizedBounds(new Rectangle(100, 100, 400, 400));
frame.setVisible(true);
}
});
}
}
Toggle zoom button, the frame goes to maximized state using specified bounds.
Toggle zoom button again, the frame returns to its original state.
Drag the frame to the second the second monitor.
Toggle zoom button, the frame jumps to the first monitor.
Need 2 monitors to reproduce.
Compile and run the following application that shows a frame.
FrameJumpingTest.java
import javax.swing.*;
import java.awt.*;
public class FrameJumpingTest {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
JFrame frame = new JFrame("Frame Jumping Test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setBounds(0, 0, 200, 200);
frame.setMaximizedBounds(new Rectangle(100, 100, 400, 400));
frame.setVisible(true);
}
});
}
}
Toggle zoom button, the frame goes to maximized state using specified bounds.
Toggle zoom button again, the frame returns to its original state.
Drag the frame to the second the second monitor.
Toggle zoom button, the frame jumps to the first monitor.