JDK-6200438 : Frame's size must be validated against maximized bounds when resizing, win32
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0,1.4.2,6
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: linux,windows_xp
  • CPU: x86
  • Submitted: 2004-11-25
  • Updated: 2006-08-28
  • Resolved: 2006-08-28
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
I have set the maximized bounds of a frame to 0,0, 400, 400. This is honored properly when maximizing the frame. But when resizing the frame manually, I am able to resize the frame beyond the maximum bounds on win32. This must be restricted. User should not be able to resize a frame beyond the maximized bounds specified.

This is reproducible on win32 since 1.4. Not reproducible on Solaris / Linux with XToolkit. 

I have attached a sample test. Execute the sample test. Try resizing the frame to the size of the screen. If resizing is not restricted to the dimension of 400, 400, then the bug is reproduced.

Comments
EVALUATION The behavior of setMaximizedBounds on win32 is correct. It controls dimensions of Frame upon maximizing. The maximum dimensions should be restricted with setMaximumSize. See 6464548 for details
28-08-2006

EVALUATION There are some difficulties in implementation of setMaximumSize(). 1. Window.setMaximumSize() interferes with Frame.setMaximizedBounds() 2. Gnome ignores max hints sometimes 3. KDE hides 'maximize window' button if max hints are set
02-05-2006