我很难搞清楚为什么它同时关闭主要和当前的JFrame。我以粗体突出显示的部分是我遇到麻烦的地方。当我在主框架中并单击事件按钮然后退出它也退出主框架
public void mouseClicked(MouseEvent e) {
if (e.getSource() == m_btnAddRemoveFriend) {
openAddRemoveGUI();
//If the log out button is pressed, open Login
} else if (e.getSource() == m_btnLogOut) {
logOut();
} else if (e.getSource() == m_contactsList) {
openCommHist();
} else if (e.getSource() == m_groupConversationsList) {
openMultiRepHist();
} else if (e.getSource() == m_btnSendMessage) {
openSendMessageGUI();
} else if (e.getSource() == m_friendRequestsList) {
openFriendRequestGUI();
} else if (e.getSource() == m_btnCollaborativeDrawingEnvironment) {
openDrawingEnvGUI();
} else if (e.getSource() == m_btnAccountSettings) {
openAccountSettingsGUI();
**} else if (e.getSource() == m_btnProductTable) {
new ProductTable().setVisible(true);
Skypertawe.saveApplicationState();
}**