Java tutorial
import javax.swing.JComboBox; import javax.swing.JFrame; public class Main extends JFrame { public Main() { super(); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JComboBox jcb = new JComboBox(new String[] { "a", "b", "c", "d" }); getContentPane().add(jcb); setSize(200, 50); setVisible(true); } public static void main(String[] args) { new Main(); } }