Skip to main content

Frame#setMaximizedBounds not working properly

1 reply [Last post]
Joined: 2004-08-31

JFrame#setMaximizedBounds ist still not working properly on dual screen environment even if Bug 6699851 states that the issue has been fixed in Java7b121.

The intention is to respect existing task bars which means to respect the screen insets - to achieve this Bug 6899304 should be fixed too. Anyway, even without fixing the screen insets bug the frame size isn't correctly set when being modified just in the example below.

      GraphicsConfiguration gc = frame.getGraphicsConfiguration();
      Rectangle maxBounds = gc.getBounds();
      <strong>maxBounds.height -= 40;</strong>

By subtracting some pixels from the height the window gets larger (wider and higher) than the screen resolution. Because of this Bug 6699851 should be reopened and properly fixed - the fix is BTW very appreciated. Please also consider to fix Bug 6899304.




Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-05-05

If the issue persists with the latest build, please report a bug at .
Dalibor Topic, Java F/OSS Ambassador, Java Products Group, Oracle