This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,794 Users
  • 2,269,775 Discussions


Mac:Window shrinks into the corner when maximized on OSX 10.8


My application creates a Frame like this:

Frame foo = new Frame();
Rectangle bounds = new Rectangle(0, 0, WIDTH, HEIGHT);

If the WIDTH and HEIGHT are the full dimensions of the screen, or the maximum allowed after accounting for toolkit insets, then setExtendedState(Frame.MAXIMIZED_BOTH) causes the window to shrink to the smallest possible size down in the lower-left corner of the screen.

If I omit the setExtendedState() call, then the window is full-sized.

If I include setExtendedState(), but initialize the bounds to something smaller (e.g. 640x480), the window appears and then maximizes as expected.

Has anyone else seen this behavior? This seems to occur ONLY on Mac OS X (my system is 10.8.3, JDK 1.7u17). On Windows, I always get a maximized window as expected.

This discussion has been closed.