title: how to create jcombobox with jcheck box and multiple selection
body: <p>I want to create JComboBox with checkboxes and multiple selection . i have created a list with check box after rendering the jlist . I dont know how to render it with jcombobox . Or is it possible to make jlist as drop down list like combo box . 
   for jlist rendering i am using the following code</p>
  
  <pre><code>  DefaultListModel listModel = new DefaultListModel();
      ListCheckBox li= new ListCheckBox(listModel);
      JScrollPane jsp= new JScrollPane(li);
      add(jsp);
  
      listModel.add(0,new JCheckBox("Other Court"));
  
      listModel.add(0,new JCheckBox("Tribunal Court"));
  
      listModel.add(0,new JCheckBox("High Court"));
     listModel.add(0,new JCheckBox("Supreme Court"));
  </code></pre>
  
  <p>ListCheck Box class is as following</p>
  
  <pre><code> import javax.swing.*;
   import javax.swing.border.*;
   import java.awt.*;
   import java.awt.event.*;
  
   public class ListCheckBox extends JList
  {
  protected static Border noFocusBorder =
   new EmptyBorder(1, 1, 1, 1);
  
  public ListCheckBox(DefaultListModel model)
  
  
    {
  
     super(model)  ;
     setCellRenderer(new CellRenderer());
  
      addMouseListener(new MouseAdapter()
       {
          public void mousePressed(MouseEvent e)
          {
             int index = locationToIndex(e.getPoint());
  
             if (index != -1) {
                JCheckBox checkbox = (JCheckBox)
                            getModel().getElementAt(index);
  
  
  
                checkbox.setSelected(
                                   !checkbox.isSelected());
                repaint();
              }
            }
          }
        );
  
       setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     }
  
     protected class CellRenderer implements ListCellRenderer
     {
     public Component getListCellRendererComponent(
      JList list, Object value, int index,
      boolean isSelected, boolean cellHasFocus)
       {  JCheckBox checkbox = (JCheckBox) value;
       checkbox.setBackground(isSelected ?
        getSelectionBackground() : getBackground());
       checkbox.setForeground(isSelected ?
       getSelectionForeground() : getForeground());
       checkbox.setEnabled(isEnabled());
       checkbox.setFont(getFont());
       checkbox.setFocusPainted(false);
       checkbox.setBorderPainted(true);
       checkbox.setBorder(isSelected ?
        UIManager.getBorder(
         "List.focusCellHighlightBorder") : noFocusBorder);
        return checkbox;
        }
      }
   }
  </code></pre>