How do I create JComboBox?

A JComboBox allows user to select a value from a drop down items available in the component. When the combo box set to editable user can enter their own value by typing it directly in the combo box editor. The code below demonstrate how you can create a simple combo box component.