public void run() {

        friendsList.setVisible(true); //show the list when a thread is created

        //Set mac stuff - buggy in Lion
        System.setProperty("apple.laf.useScreenMenuBar", "true"); //if mac use the screen menu bar

        friends = Controller.getFriendsList(); //get the friends list

        //parse user object in friends list
        Iterator itr = friends.iterator();
        while (itr.hasNext()) {
            User temp = (User) itr.next();
            html = html + "<a href=\"" + temp.getScreenName() + "\"><img align=\"left\" border=\"0\" width=\"30\" height=\"30\" src=\"" + temp.getProfileImageURL() + "\">&nbsp;<strong>" + temp.getScreenName() + "</strong> (" + temp.getName() + ")</a><hr />";
        }

        //update display
        fList.setText(html);

        //set loaded flag
        loaded = true;

        boolean newRun = false;

        //check for new messages and open new session if necessary
        while (true) {
            boolean newMessages = true;
            messages = Controller.getMessages(newRun);
            newRun = true;
            Iterator mitr = messages.iterator();
            while (mitr.hasNext() && newMessages == true) {

                DirectMessage message = (DirectMessage) mitr.next();

                if (lastMessage.before(message.getCreatedAt())) {
                    String sender = message.getSenderScreenName();
                    lastMessage = message.getCreatedAt();
                    if (Controller.checkClient(sender) == false) {
                        //start a new chat session and register with controller
                        Thread ct = new Thread(new ChatSession(sender));
                        ct.start();
                        Controller.addClient(sender);

                    }
                } else {
                    newMessages = false;
                }

            }
            try {
                Thread.sleep(10000); //sleep 10 seconds
            } catch (InterruptedException ex) {
                Logger.getLogger(FriendsList.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }