title: JCombobox hovered element not present in subclass
body: <p>I use some comboboxes in a jtable.
  On the third column I needed to add tooltips in order to give addition information about the options. My problem is that I can't get to see what's the hovered element anymore.</p>
  
  <p>What am I missing?</p>
  
  <pre><code>public class ComboBoxToolTipExample extends JComboBox {  
  
     String[] comboboxitems = new String[] { "A", "FC", "SN","NS", "N", "S", "FD", "FN" };
     String[] tooltip = new String[] { "Alphanumerique", "Commentaire", "Signe Numerique","Numerique Signe", "Numerique", "Signe", "Date", "Fonction Numerique" };
  
   public ComboBoxToolTipExample() {  
     super();
  
     this.setModel(new DefaultComboBoxModel(comboboxitems));
     this.setRenderer(new ComboBoxRenderer());  
     this.setEnabled(true);
  
    }  
  
    class ComboBoxRenderer extends BasicComboBoxRenderer {  
  
       public ComboBoxRenderer() {
  super();
   }
  
     @Override  
     public Component getListCellRendererComponent(JList list, Object value,  
             int index, boolean isSelected, boolean cellHasFocus) {  
         if (isSelected) {  
             setBackground(list.getSelectionBackground());  
             setForeground(list.getSelectionForeground());  
             if (-1 &lt; index) {  
                 list.setToolTipText(tooltip[index]);  
             }  
         } else {  
             setBackground(list.getBackground());  
             setForeground(list.getForeground());  
         }  
         setFont(list.getFont());  
         setText((value == null) ? "" : value.toString());  
         return this;  
     }  
     }  
  
  
     }  
  </code></pre>
  
  <p>This is the result:</p>
  
  <p><a href="https://i.stack.imgur.com/NwbXa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NwbXa.png" alt="enter image description here"></a></p>
  
  <p>This is how I would like it to appear, including the tooltip:</p>
  
  <p><a href="https://i.stack.imgur.com/KRn92.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KRn92.png" alt="enter image description here"></a></p>