public boolean closeAppView() { if (m_principalapp == null) { return true; } else if (!m_principalapp.deactivate()) { return false; } else { // the status label jPanel3.remove(m_principalapp.getNotificator()); jPanel3.revalidate(); jPanel3.repaint(); // remove the card m_jPanelContainer.remove(m_principalapp); m_principalapp = null; showLogin(); return true; } }