protected FollowingList(User currUser, ResultSet rs, Connection cnxn) {
        super(new BorderLayout());
        this.currUser = currUser;
        this.cnxn = cnxn;
 
        listModel = new DefaultListModel();
        
        //get usernames followed out of result set
        try {
			while (rs.next()) {
				listModel.addElement(rs.getString("name"));
				rsltCnt++;
			}
		} catch (SQLException e) {
			// TODO fail gracefully
		}
         
        //Create the list and put it in a scroll pane.
        list = new JList(listModel);
        list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        
        //handle selecting item on list
        list.addListSelectionListener(this);
        
        //show first five followed, scroll for rest
        list.setVisibleRowCount(5);
        JScrollPane listScrollPane = new JScrollPane(list);        
 
        //Create a panel that uses BoxLayout.
        JPanel buttonPane = new JPanel();
        buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));

        buttonPane.add(Box.createHorizontalStrut(5));
        buttonPane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
        
        //add button if following at least one user
        if (rsltCnt > 0) {
        	//create unfollow button
        	unfollowButton = new JButton(UNFOLLOW_STRING);
	        unfollowButton.setActionCommand(UNFOLLOW_STRING);
	        unfollowButton.addActionListener(new UnfollowListener());
        	buttonPane.add(unfollowButton);
        }
        
        add(listScrollPane, BorderLayout.CENTER);
        add(buttonPane, BorderLayout.PAGE_END);
    }