JList and JComboBox

To customize the behavior and appearance of JList and JComboBox, we plug in our own Models and Renderers using the setModel() and setRenderer() methods.
JList
- dataModel : ListModel
- renderer : ListCellRenderer
+ JList()
+ JList(ListModel)
+ setModel(ListModel)
+ getModel() : ListModel
+ setCellRenderer(ListCellRenderer)
+ getCellRenderer() : ListCellRenderer
+ setSelectedValue(Object)
+ getSelectedValue() : Object
JComboBox
# dataModel : ComboBoxModel
# renderer : ListCellRenderer
+ JComboBox()
+ JComboBox(ComboBoxModel)
+ setModel(ComboBoxModel)
+ getModel() : ComboBoxModel
+ setRenderer(ListCellRenderer)
+ getRenderer() : ListCellRenderer
+ getSelectedItem() : Object
+ setSelectedItem(Object)
class ServerPanel extends JComponent {
    ...
    private JComboBox categoryComboBox;
    private JList resourceListBox;
    private JComboBox filterComboBox;

    private CategoryComboBoxModel categoryComboBoxModel;
    private FilterComboBoxModel filterComboBoxModel;
    private ResourceListModel resourceListModel;

    ServerPanel(ResourceServer server, ResourceChooser chooser) {
        ...
        categoryComboBox = new JComboBox();
        resourceListBox = new JList();
        filterComboBox = new JComboBox();
        ...
        categoryComboBoxModel = new CategoryComboBoxModel(root);
        resourceListModel     = new ResourceListModel(this);
        filterComboBoxModel   = new FilterComboBoxModel();
        ...
        categoryComboBox.setModel(categoryComboBoxModel);
        resourceListBox.setModel(resourceListModel);
        filterComboBox.setModel(filterComboBoxModel);
        ...
        categoryComboBox.setRenderer(new CategoryComboBoxCellRenderer());
        resourceListBox.setCellRenderer(new ResourceListCellRenderer());
        filterComboBox.setRenderer(new FilterComboBoxCellRenderer());
        ...
    }
}