public void run() {

        //authorize with Twitter
        authorize();

        //create and start the friends list
        FriendsList fl = new FriendsList();
        Thread friendsList = new Thread(fl);
        friendsList.start();

        //wait until friendslist is loaded before continuing
        while (fl.getLoaded() == false) {
            try {
                Thread.sleep(500); //sleep for half second then try again.
            } catch (InterruptedException ex) {
                Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

        //start polling for new direct messages
        Thread getDms = new Thread(new GetDms());
        getDms.start();
        
        //Start the system tray icon
        Thread stray = new Thread(new Stray()); 
        stray.start();
    }