当我按下特定按钮时关闭上一个窗口

时间:2018-03-20 22:17:59

标签: java swing jframe windowsbuilder

当我按下java中的特定按钮时关闭上一个窗口我该怎么做

I mean after I click on the registration I want the window called "Yuval Library " to close

1 个答案:

答案 0 :(得分:0)

如果要模拟“X”的点击,则将windowEvent(在这种情况下结束)发送到“Yuval Library”。

coxph(surv(time, event)~x

如果您只想关闭JFrame处理它:

jframe.dispatchEvent(new WindowEvent(jframe, WindowEvent.WINDOW_CLOSING));