Configures the list which is used to hold the combo box items in the
popup. This method is called when the UI class
is created.
list.setFont( comboBox.getFont() );
list.setCellRenderer( comboBox.getRenderer() );
list.setFocusable( false );
list.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );
int selectedIndex = comboBox.getSelectedIndex();
if ( selectedIndex == -1 ) {
list.clearSelection();
}
else {
list.setSelectedIndex( selectedIndex );
list.ensureIndexIsVisible( selectedIndex );
}
installListListeners();