Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8158215

[macosx] Maximize button eventually stops working if setMaximizedBounds invoked

XMLWordPrintable

      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.

            Unassigned Unassigned
            yan Yuri Nesterenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: