From 06503f26f2847ab9c95c85147b98cb975479bec5 Mon Sep 17 00:00:00 2001 From: Gust Date: Fri, 20 Dec 2024 17:27:24 +0800 Subject: [PATCH] Update GFrame.java --- extlib/xgui/src/main/java/org/mini/gui/GFrame.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extlib/xgui/src/main/java/org/mini/gui/GFrame.java b/extlib/xgui/src/main/java/org/mini/gui/GFrame.java index 0e846abc..490a3ccf 100644 --- a/extlib/xgui/src/main/java/org/mini/gui/GFrame.java +++ b/extlib/xgui/src/main/java/org/mini/gui/GFrame.java @@ -191,6 +191,12 @@ public void validLocation() { if (getY() > parent.getY() + parent.getH() - 30) { setLocation(getLocationLeft(), parent.getH() - 30); } + if (getW() > parent.getW()) { + setLocation(0, getLocationTop()); + } + if (getH() > parent.getH()) { + setLocation(getLocationLeft(), 0); + } } @Override