0

Hi im having trouble figuring out why it closes both the main and current JFrame at the same time. the part i highlighted in bold is where im having trouble. when im in the main frame and click the events button and then exit it also exit main frame

 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();
            }**
c0der
  • 18,467
  • 6
  • 33
  • 65
Swift
  • 15
  • 3

0 Answers0