Skip to main content

Frame#setMaximizedBounds not working properly

1 reply [Last post]
wzberger
Offline
Joined: 2004-08-31
Points: 0

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>
      maxBounds.x=0;
      f.setMaximizedBounds(maxBounds);

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.

Thanks,

Wolfgang

www.jyloo.com

 

Reply viewing options

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

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