@ Override protected void configureList ( ) { list . setFont ( comboBox . getFont ( ) ) ; list . setBorder ( null ) ; 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 ( ) ; }
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 .