--- a/jdk/src/java.desktop/share/classes/javax/swing/JMenu.java Mon Feb 09 09:52:48 2015 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JMenu.java Wed Feb 11 07:54:39 2015 +0100
@@ -476,7 +476,8 @@
}
// Then the y:
y = s.height + yOffset; // Prefer dropping down
- if (position.y + y + pmSize.height >= screenBounds.height &&
+ if (position.y + y + pmSize.height >= screenBounds.height
+ + screenBounds.y &&
// popup doesn't fit - place it wherever there's more room
screenBounds.height - s.height < 2*(position.y
- screenBounds.y)) {