JDK-8032595 : [macosx] setResizable(false) makes a frame slide down
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-01-23
  • Updated: 2016-05-17
  • Resolved: 2014-03-26
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 8 JDK 9
8u20Fixed 9 b12Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
If setResizable(false) is called before setVisible the frame slides to the down left corner of the screen.

To reproduce use:

import javax.swing.*;
import java.awt.*;

public class JFramePositionTest {

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

    public JFramePositionTest(){
        JFrame aFrame = new JFrame();
        aFrame.setSize(300,300);
        aFrame.setResizable(false);
        aFrame.setVisible(true);
        //aFrame.setResizable(false); //COMMENT ABOVE setResizable(false) method and CALL THE CODE HERE THEN THERE'S NO PROBLEM
        aFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

    }

}
Comments
Changed priority to P2 as this is critical for the Java Control Panel.
24-03-2014

Release team: Approved for deferral.
24-01-2014

JDK8: SQE OK to defer
24-01-2014

Defer justification: 1. Not a TCK, not critical, not a show stopper. 2. The easy workaround is to use setResizable after setVisible. 3. Fixing this is risky as the bounds handling code on macosx is complicated.
23-01-2014