import java.awt.*; import java.awt.event.*; import javax.swing.*; class Example2 extends JFrame { public Example2() { Container content_pane = this.getContentPane(); content_pane.setLayout(new FlowLayout()); String[] names = {"Gregory D. Abowd","Khai N. Truong","George P. Burdell"}; JComboBox combobox =new JComboBox(names); content_pane.add(combobox); setSize(300,300); setVisible(true); //// 1) access to the data shown in the component ComboBoxModel model = combobox.getModel(); System.out.println("selected item: " + model.getSelectedItem()); for (int i=0; i