我希望使用 JFrame 上的按钮从 JFrame 关闭 JInternalFrame。
从下面的代码中,您会注意到我尝试使用 setVisible()、hide() 或 dispose() 方法,但这些方法不起作用。
//
public void dismisssetupReceiverJIframe() {
System.out.println("\n dismisssetupReceiverJIframe() - START OF dismisssetupReceiverJIframe() ");
// Check if the the setup receiver open flag is true, if so then execute subsequent steps. If not do nothing.
//if (isSetupRecvScnOpen == true) {
// Dispose of the setupReceiverJIframe
setupReceiverJIframe setupReceiverJIframe = new setupReceiverJIframe();
setupReceiverJIframe.setVisible(false);
//setupReceiverJIframe.hide();
setupReceiverJIframe.dispose();
// The text areas, label and button are in the JFrame
btnOneTextArea.setVisible(true);
btnTwoTextArea.setVisible(true);
btnThreeTextArea.setVisible(true);
btnFourTextArea.setVisible(true);
btnFiveTextArea.setVisible(true);
btnSixTextArea.setVisible(true);
btnSevenTextArea.setVisible(true);
btnEightTextArea.setVisible(true);
btnNineTextArea.setVisible(true);
btnTenTextArea.setVisible(true);
btnElevenTextArea.setVisible(true);
btnTwelveTextArea.setVisible(true);
btnThirteenTextArea.setVisible(true);
btnFourteenTextArea.setVisible(true);
btnFifteenTextArea.setVisible(true);
btnSixteenTextArea.setVisible(true);
btnSeventeenTextArea.setVisible(true);
notifMssgLabel.setVisible(true);
btnSaveAll.setVisible(true);
//}
System.out.println("\n dismisssetupReceiverJIframe() - END OF dismisssetupReceiverJIframe() ");
}
是否有另一种方法或方式从 JFrame 关闭 JInternalFrame?
感谢你的协助