-
Bug
-
Resolution: Fixed
-
P3
-
9, 10
-
b05
-
x86
-
os_x
FULL PRODUCT VERSION :
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
OS X 10.12.6
A DESCRIPTION OF THE PROBLEM :
Under Java 9, once a JFrame is maximized, any new JFrames that are open default to maximized. This was not the behavior under Java 8 and earlier.
REGRESSION. Last worked in version 8u152
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run program on OS X. Maximize the window. Push the button.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expect the new JFrame to open unmaximized.
ACTUAL -
The new JFrame opens maximized.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.awt.event.*;
public class FrameBug {
public static void main(String[] args) {
SwingUtilities.invokeLater(
new Runnable() {
public void run() {
go();
}
});
}
public static void go() {
final JFrame frame = new JFrame();
JButton button = new JButton("Open Frame");
frame.getContentPane().add(button);
button.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
JFrame f = new JFrame();
f.setSize(400, 400);
f.setVisible(true);
}
});
frame.setSize(500, 500);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
OS X 10.12.6
A DESCRIPTION OF THE PROBLEM :
Under Java 9, once a JFrame is maximized, any new JFrames that are open default to maximized. This was not the behavior under Java 8 and earlier.
REGRESSION. Last worked in version 8u152
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run program on OS X. Maximize the window. Push the button.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expect the new JFrame to open unmaximized.
ACTUAL -
The new JFrame opens maximized.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.awt.event.*;
public class FrameBug {
public static void main(String[] args) {
SwingUtilities.invokeLater(
new Runnable() {
public void run() {
go();
}
});
}
public static void go() {
final JFrame frame = new JFrame();
JButton button = new JButton("Open Frame");
frame.getContentPane().add(button);
button.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
JFrame f = new JFrame();
f.setSize(400, 400);
f.setVisible(true);
}
});
frame.setSize(500, 500);
frame.setVisible(true);
}
}
---------- END SOURCE ----------