Java examples for Swing:JComboBox
Create JComboBox using an array of String as the list of choices
import javax.swing.JComboBox; public class Main { public static void main(String[] args) { String[] sList = new String[] { "Spring", "Summer", "Fall", "Winter" }; JComboBox<String> seasons = new JComboBox<>(sList); }//from w ww.ja v a2 s.co m }