JDK-8158215 : [macosx] Maximize button eventually stops working if setMaximizedBounds invoked
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 9,10
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2016-05-31
  • Updated: 2021-07-13
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.
Other
tbdUnresolved
Description
Run a simplest test on OS X (I use 10.11):
import java.awt.*;
import java.awt.event.*;

public class MaxiBounds {
    static Frame frame;
    public static void main(String args[]) {
        frame = new Frame("frame");
        frame.setLayout(new GridLayout(2,1));
        frame.setBounds(50,50,200,200);
        frame.setMaximizedBounds(new Rectangle(100,100,350,350));
        frame.setVisible(true);
    }
}

Click Maximize button. The frame would enlarge to 350x350. Click again: it would go back to 200x200. Repeat several times (three or four was enough for me), and eventually the operation would have no effect whatsoever: bounds will be frozen.

I tried this with b120 and b111, both fail like this. The feature was implemented in b68 but I didn't try it that far back.
Comments
Targeted to 10 as an issue introduced in 8u or 9
17-02-2017

Approved by component triage team to defer
23-06-2016

SQE OK to defer.
22-06-2016

Requesting to defer the issue for the following reasons: 1) Issue is inconsistent. Sometimes the issue is not at all observed. 2) Issue is sometimes observed when the frame is moved in maximized mode (when the frame is maximized). 3) Issue is not observed with JDK 8b132 but the frame size maximizes to full window but with JDK 9 the size of frame is as defined in the problem.
15-06-2016

Issue not observed with JDK 8b132. But the window maximises to full window instead to the size set in the program.
10-06-2016

The problem is reproduced in OS 10.10.5 with java version: java version "9-internal" Java(TM) SE Runtime Environment (build 9-internal+0-2016-05-31-164215.mahalder.client) Java HotSpot(TM) 64-Bit Server VM (build 9-internal+0-2016-05-31-164215.mahalder.client, mixed mode)
01-06-2016