-
Bug
-
Resolution: Fixed
-
P3
-
8
-
b68
-
x86
-
os_x
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8098716 | emb-9 | Alexandr Scherbatiy | P3 | Resolved | Fixed | team |
FULL PRODUCT VERSION :
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
MacOS 10.9.5, 10.10
A DESCRIPTION OF THE PROBLEM :
I have found that displaying a frame can cause the frame to warp to the lower left corner of the screen, similar to the effect reported in bug 8032595 (which is reportedly fixed in this release). Two conditions appear to be necessary: Before making the frame visible, the frame is first packed, then resized with a height close to or greater than the available screen height.
REGRESSION. Last worked in version 7u45
ADDITIONAL REGRESSION INFORMATION:
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
The following test program illustrates.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The frame should be visible and (nearly) fill the screen.
ACTUAL -
The top of the frame is near the bottom of the screen, so that the frame is mostly not visible.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package test;
import javax.swing.*;
import java.awt.*;
public class Main
{
public Main()
{
int offset = 10; // the bug happens when offset is <= 10
GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
Rectangle gb = gc.getBounds();
Insets s = Toolkit.getDefaultToolkit().getScreenInsets(gc);
Rectangle r = new Rectangle(gb.x + s.left, gb.y + s.top, gb.width - s.left - s.right, gb.height - s.top - s.bottom - offset);
final JFrame w = new JFrame();
w.pack(); // necessary to show the bug
w.setBounds(r);
w.setVisible(true);
}
public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new Main();
}
});
}
}
// not affected by dock position or hiding
// not affected by screen menu bar
// happens in JDK 8u25, not in JDK 7
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Don't pack or don't make the frame too tall.
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
MacOS 10.9.5, 10.10
A DESCRIPTION OF THE PROBLEM :
I have found that displaying a frame can cause the frame to warp to the lower left corner of the screen, similar to the effect reported in bug 8032595 (which is reportedly fixed in this release). Two conditions appear to be necessary: Before making the frame visible, the frame is first packed, then resized with a height close to or greater than the available screen height.
REGRESSION. Last worked in version 7u45
ADDITIONAL REGRESSION INFORMATION:
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
The following test program illustrates.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The frame should be visible and (nearly) fill the screen.
ACTUAL -
The top of the frame is near the bottom of the screen, so that the frame is mostly not visible.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package test;
import javax.swing.*;
import java.awt.*;
public class Main
{
public Main()
{
int offset = 10; // the bug happens when offset is <= 10
GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
Rectangle gb = gc.getBounds();
Insets s = Toolkit.getDefaultToolkit().getScreenInsets(gc);
Rectangle r = new Rectangle(gb.x + s.left, gb.y + s.top, gb.width - s.left - s.right, gb.height - s.top - s.bottom - offset);
final JFrame w = new JFrame();
w.pack(); // necessary to show the bug
w.setBounds(r);
w.setVisible(true);
}
public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new Main();
}
});
}
}
// not affected by dock position or hiding
// not affected by screen menu bar
// happens in JDK 8u25, not in JDK 7
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Don't pack or don't make the frame too tall.
- backported by
-
JDK-8098716 [macosx] Frame warps to lower left of screen when displayed
-
- Resolved
-
- relates to
-
JDK-8032595 [macosx] setResizable(false) makes a frame slide down
-
- Resolved
-
-
JDK-8131339 [macosx] setMaximizedBounds() doesn't work for undecorated Frame
-
- Resolved
-
-
JDK-8129569 [TEST_BUG] Test java/awt/Frame/MaximizedToUnmaximized/MaximizedToUnmaximized.java fails
-
- Resolved
-