public void setContactList(String text) {
        String[] temp = text.split(" ");
        Set<String> onlineUsers = new HashSet<String>();

        // Reset contactListModel
        contactListModel.clear();
        
        for (String name : temp) {
            // Don't add the name if its equal to the username
            if (!name.equals(username)) {
                onlineUsers.add(name);
                contactListModel.addElement(name);
            }

            contactList=new JList(contactListModel);
            // Close convo windows of people who are now logged off
            for (String username : usernameToChats.keySet()) {
                if (!onlineUsers.contains(username)) {
                    if (usernameToChats.get(username).isVisible()) {
                        usernameToChats.get(username).dispose();
                        usernameToChats.remove(username);
                        JOptionPane.showMessageDialog(frame, "The user "
                                + username + " is no longer online.",
                                "Log Off Notification",
                                JOptionPane.INFORMATION_MESSAGE);
                    } else {
                        usernameToChats.get(username).dispose();
                        usernameToChats.remove(username);
                    }
                }
            }          
        }
    }