|
|
|
@ -398,9 +398,11 @@ public final class GUICoreUtils {
|
|
|
|
|
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); |
|
|
|
|
screen.setSize(screen.getSize().width, screen.height - HEIGHT_GAP); |
|
|
|
|
|
|
|
|
|
int showOnScreenX = Math.min(screen.width, parentComponent.getLocationOnScreen().x + parentComponent.getWidth()); |
|
|
|
|
|
|
|
|
|
// peter:调整X的高度.
|
|
|
|
|
if (point.x + size.width > screen.width && size.width < screen.width) { |
|
|
|
|
x += (screen.width - point.x - size.width); |
|
|
|
|
if (point.x + size.width > showOnScreenX && size.width < showOnScreenX) { |
|
|
|
|
x += (showOnScreenX - point.x - size.width); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// peter:调整y高度.
|
|
|
|
|