Skip to content

Commit ad1a14f

Browse files
committed
优化窗口关闭回调事件。
1 parent 47961d0 commit ad1a14f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/com/xwintop/xJavaFxTool/utils/JavaFxViewUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public static Stage getNewStage(String title, String iconUrl, FXMLLoader fXMLLoa
142142
//设置窗口移除前回调
143143
public static void setControllerOnCloseRequest(Object controller, Event event) {
144144
try {
145-
Method method = MethodUtils.getAccessibleMethod(controller.getClass(), "onCloseRequest", event.getClass());
145+
Method method = MethodUtils.getAccessibleMethod(controller.getClass(), "onCloseRequest", Event.class);
146146
if (method != null) {
147147
MethodUtils.invokeMethod(controller, "onCloseRequest", event);
148148
}

0 commit comments

Comments
 (0)