class AutoCompleteCombo extends JComboBox {

  private static final String me = "PatternPaneNaming: ";
  final static int TXT_FILENAME_LENGTH = 20;
  public int caretPos = 0;
  public JTextField editor = null;

  public AutoCompleteCombo(final Object items[]) {
    super(items);
    this.setEditable(true);
    setHook();
    //hideDropDownButton();
  }

  private void hideDropDownButton() {<FILL_FUNCTION_BODY>}

  @Override
  public void setSelectedIndex(int ind) {
    super.setSelectedIndex(ind);
    editor.setText(getItemAt(ind).toString());
    editor.setSelectionEnd(caretPos + editor.getText().length());
    editor.moveCaretPosition(caretPos);
  }

  public void setHook() {
    ComboBoxEditor anEditor = this.getEditor();
    if (anEditor.getEditorComponent() instanceof JTextField) {
      editor = (JTextField) anEditor.getEditorComponent();
      editor.setColumns(TXT_FILENAME_LENGTH);
      editor.addKeyListener(new KeyAdapter() {
        public void keyReleased(KeyEvent ev) {
          char key = ev.getKeyChar();
          if (!(Character.isLetterOrDigit(key) || Character
              .isSpaceChar(key))) {
            return;
          }
          caretPos = editor.getCaretPosition();
          String text = "";
          try {
            text = editor.getText(0, caretPos);
          } catch (Exception ex) {
            Debug.error(me + "setHook: Problem getting image file name\n%s", ex.getMessage());
          }
          int n = getItemCount();
          for (int i = 0; i < n; i++) {
            int ind = ((String) getItemAt(i)).indexOf(text);
            if (ind == 0) {
              setSelectedIndex(i);
              return;
            }
          }
        }
      });
    }
  }

}

    for (Component component : this.getComponents()) {
      if (component instanceof AbstractButton && component.isVisible()) {
        component.setVisible(false);
        this.revalidate();
      }
    }
  
<methods>public void <init>() ,public void <init>(ComboBoxModel#RAW) ,public void <init>(java.lang.Object[]) ,public void <init>(Vector#RAW) ,public void actionPerformed(java.awt.event.ActionEvent) ,public void addActionListener(java.awt.event.ActionListener) ,public void addItem(java.lang.Object) ,public void addItemListener(java.awt.event.ItemListener) ,public void addPopupMenuListener(javax.swing.event.PopupMenuListener) ,public void configureEditor(javax.swing.ComboBoxEditor, java.lang.Object) ,public void contentsChanged(javax.swing.event.ListDataEvent) ,public void firePopupMenuCanceled() ,public void firePopupMenuWillBecomeInvisible() ,public void firePopupMenuWillBecomeVisible() ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.Action getAction() ,public java.lang.String getActionCommand() ,public java.awt.event.ActionListener[] getActionListeners() ,public javax.swing.ComboBoxEditor getEditor() ,public java.lang.Object getItemAt(int) ,public int getItemCount() ,public java.awt.event.ItemListener[] getItemListeners() ,public javax.swing.JComboBox.KeySelectionManager getKeySelectionManager() ,public int getMaximumRowCount() ,public ComboBoxModel#RAW getModel() ,public javax.swing.event.PopupMenuListener[] getPopupMenuListeners() ,public java.lang.Object getPrototypeDisplayValue() ,public ListCellRenderer#RAW getRenderer() ,public int getSelectedIndex() ,public java.lang.Object getSelectedItem() ,public java.lang.Object[] getSelectedObjects() ,public javax.swing.plaf.ComboBoxUI getUI() ,public java.lang.String getUIClassID() ,public void hidePopup() ,public void insertItemAt(java.lang.Object, int) ,public void intervalAdded(javax.swing.event.ListDataEvent) ,public void intervalRemoved(javax.swing.event.ListDataEvent) ,public boolean isEditable() ,public boolean isLightWeightPopupEnabled() ,public boolean isPopupVisible() ,public void processKeyEvent(java.awt.event.KeyEvent) ,public void removeActionListener(java.awt.event.ActionListener) ,public void removeAllItems() ,public void removeItem(java.lang.Object) ,public void removeItemAt(int) ,public void removeItemListener(java.awt.event.ItemListener) ,public void removePopupMenuListener(javax.swing.event.PopupMenuListener) ,public boolean selectWithKeyChar(char) ,public void setAction(javax.swing.Action) ,public void setActionCommand(java.lang.String) ,public void setEditable(boolean) ,public void setEditor(javax.swing.ComboBoxEditor) ,public void setEnabled(boolean) ,public void setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager) ,public void setLightWeightPopupEnabled(boolean) ,public void setMaximumRowCount(int) ,public void setModel(ComboBoxModel#RAW) ,public void setPopupVisible(boolean) ,public void setPrototypeDisplayValue(java.lang.Object) ,public void setRenderer(ListCellRenderer#RAW) ,public void setSelectedIndex(int) ,public void setSelectedItem(java.lang.Object) ,public void setUI(javax.swing.plaf.ComboBoxUI) ,public void showPopup() ,public void updateUI() <variables>private javax.swing.Action action,protected java.lang.String actionCommand,private java.beans.PropertyChangeListener actionPropertyChangeListener,protected ComboBoxModel#RAW dataModel,protected javax.swing.ComboBoxEditor editor,private boolean firingActionEvent,protected boolean isEditable,protected javax.swing.JComboBox.KeySelectionManager keySelectionManager,protected boolean lightWeightPopupEnabled,protected int maximumRowCount,private java.lang.Object prototypeDisplayValue,protected ListCellRenderer#RAW renderer,protected java.lang.Object selectedItemReminder,private boolean selectingItem,private static final java.lang.String uiClassID,private transient boolean updateInProgress