0
我已經創建了ButtonActionPerformEvent調用dispose Method.how處理方法調用formwindowclosing事件。當前階級和打開另一個類如何在ButtonActionPerformEvent中調用formWindowClosing事件
private void Cmd01ActionPerformed(java.awt.event.ActionEvent evt) {
GVar=Txt01.getText();
dispose(**formWindowClosing**(-)); // how i can pass form closing event here.
}
一個更FormWindowClosing事件中,我創建調用setVisible真antoher類對象。
private void formWindowClosing(java.awt.event.WindowEvent evt) {
new GlobalVariableClass2().setVisible(true); //another class
}
請幫我解決這個問題。
確定不同的方法連我都setDefaultCloseOperation是anothe有可能一個事件調用r事件private void Cmd01ActionPerformed(java.awt.event.ActionEvent evt){GVar = Txt01.getText(); (處理窗口(formWindowClosing(new WindowEvent()))); setDefaultCloseOperation(); getWindows(formWindowClosing());新的GlobalVariableClass2()。setVisible(true);方法如下:private void formWindowClosing(java.awt.event.WindowEvent evt){0} {0} } – javasi
不知道你嘗試了什麼,爲了真正的幫助,請儘快用http://sscce.org/編輯你的問題, – mKorbel