JDK-6383434 : Frame.setMaximumSize() doesn't work
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-02-09
  • Updated: 2011-01-19
  • Resolved: 2006-02-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6Resolved
Related Reports
Duplicate :  
Relates :  
Description
Look at the sample below:

import java.awt.*;

public class Test extends Frame {
    public Test() {
        setMinimumSize(new Dimension(400, 400));
        setMaximumSize(new Dimension(400, 400));
        setSize(400, 400);
        setVisible(true);
    }

    public static void main(String[] args) {
        new Test();
    }
}

When I run the code above I cannot decrease the size of the Frame less than [400,400]. But at the same time I *can* increase the size of the Frame. It seems we have some inconsistency: setMinimumSize does work whereas setMaximumSize doesn't work.

The test is running on jdk6 b69.

Comments
EVALUATION It work as described on Linux XAWT and Windows with JDK6.0b67. Although this API appeared in JDK5.0 seems it doesn't work well in it. It also doesn't work with MToolkit.
10-02-2006