I have a strange bug with every java app i run with the Java 7 VM. Every frame is limited to a maximum width of 1024 pixels. Doesn't matter if you try to resize it by code or dragging the border with the mouse pointer.
I have a Macbook with Mac OSX 10.7.5 (1280x800 resolution).
If i try to run the apps with Apple's Java 6 VM all works as expected.
Here is a POC:
import javax.swing.*;
import java.awt.*;
public class JDK7Bug {
public static void main(String[] args) throws InterruptedException {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
frame.setSize(800, 400);
Thread.sleep(100);
System.out.println("frame.setSize(800, 400); " + frame.getSize());
frame.setSize(1100, 400);
Thread.sleep(100);
System.out.println("frame.setSize(1100, 400); " + frame.getSize());
frame.setSize(1000, 400);
Thread.sleep(100);
System.out.println("frame.setSize(1000, 400); "+frame.getSize());
System.out.println("ScreenSize: "+Toolkit.getDefaultToolkit().getScreenSize());
}
}
It outputs:
frame.setSize(800, 400); java.awt.Dimension[width=800,height=400]
frame.setSize(1100, 400); java.awt.Dimension[width=1024,height=400]
frame.setSize(1000, 400); java.awt.Dimension[width=1000,height=400]
ScreenSize: java.awt.Dimension[width=1280,height=800]