Public bug reported: GraphicsEnvironment.getMaximumWindowBounds() is a function supplied to openjdk to determine the largest size window which fits in the current desktop environment on a single display, taking into account OS menu bars. See http://docs.oracle.com/javase/1.5.0/docs/api/java/awt/GraphicsEnvironment.html#getMaximumWindowBounds()
Running the attached program on my system returns thue@Thue-Desktop:~$ java test java.awt.Rectangle[x=3265,y=24,width=255,height=1176] So GraphicsEnvironment.getMaximumWindowBounds() thinks that there is only room for a 255 pixel wide window on my desktop. Which is obviously silly I have a fairly standard dual-screen setup, with the left screen 1600 wide and the right screen 1920 wide. Java is trying to open the Window on the right screen. The width of 255 is very probably 1920-1600-65=255, where 65 pixels is the width of the unity menu as measured via a screenshot in GIMP. I encountered the problem while trying to run the April 22 git version of FreeCol. The example code below is snipped from there. Both Java 6 and Java 7 have the problem. Regards, Thue ---------------------- import java.awt.GraphicsEnvironment; import java.awt.Rectangle; class test { public static void main(String[] args) { determineWindowSize(); } public static void determineWindowSize() { final GraphicsEnvironment lge = GraphicsEnvironment.getLocalGraphicsEnvironment(); Rectangle bounds = lge.getMaximumWindowBounds(); System.out.println(bounds); } } ** Affects: openjdk-7 (Ubuntu) Importance: Undecided Status: New ** Package changed: qtwebkit-opensource-src (Ubuntu) => openjdk-6 (Ubuntu) ** Package changed: openjdk-6 (Ubuntu) => openjdk-7 (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1171563 Title: GraphicsEnvironment.getMaximumWindowBounds() returns wrong horizontal size in dual screen environment To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1171563/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs