List of usage examples for javax.swing JComboBox addItemListener
public void addItemListener(ItemListener aListener)
ItemListener
. From source file:Main.java
public Main() { JComboBox jc = new JComboBox(); jc.addItem("France"); jc.addItem("Germany"); jc.addItem("Italy"); jc.addItem("Japan"); jc.addItemListener(this); add(jc);/* ww w . j a va 2 s.c o m*/ AccessibleContext ac = jc.getAccessibleContext(); }
From source file:Main.java
public Main() { JComboBox jc = new JComboBox(); jc.addItem("France"); jc.addItem("Germany"); jc.addItem("Italy"); jc.addItem("Japan"); jc.addItemListener(this); add(jc);/* w w w. j ava 2s . co m*/ String cmd = jc.getActionCommand(); }
From source file:Main.java
public Main() { JComboBox jc = new JComboBox(); jc.addItem("France"); jc.addItem("Germany"); jc.addItem("Italy"); jc.addItem("Japan"); jc.addItemListener(this); add(jc);/*from w ww. ja v a 2 s .c o m*/ System.out.println(jc.isLightWeightPopupEnabled()); }
From source file:Main.java
public Main() { JComboBox jc = new JComboBox(); jc.addItem("France"); jc.addItem("Germany"); jc.addItem("Italy"); jc.addItem("Japan"); jc.addItemListener(this); add(jc);/*from w w w.jav a 2 s . com*/ System.out.println(jc.isEditable()); }
From source file:Main.java
public Main() { JComboBox jc = new JComboBox(); jc.addItem("France"); jc.addItem("Germany"); jc.addItem("Italy"); jc.addItem("Japan"); jc.addItemListener(this); add(jc);//from w w w . j a v a 2s. c om ItemListener[] lis = jc.getItemListeners(); }
From source file:Main.java
public Main() { JComboBox jc = new JComboBox(); jc.addItem("France"); jc.addItem("Germany"); jc.addItem("Italy"); jc.addItem("Japan"); jc.addItemListener(this); add(jc);//from w w w. j a v a 2 s . co m Object obj = jc.getPrototypeDisplayValue(); }
From source file:Main.java
public Main() { JComboBox jc = new JComboBox(); jc.addItem("France"); jc.addItem("Germany"); jc.addItem("Italy"); jc.addItem("Japan"); jc.addItemListener(this); add(jc);//from w w w . ja va 2 s .co m Object[] objs = jc.getSelectedObjects(); }
From source file:Main.java
public Main() { JComboBox jc = new JComboBox(); jc.addItem("France"); jc.addItem("Germany"); jc.addItem("Italy"); jc.addItem("Japan"); jc.addItemListener(this); add(jc);// w ww. j a v a2 s. c om PopupMenuListener[] pop = jc.getPopupMenuListeners(); }
From source file:Main.java
public Main() { JComboBox jc = new JComboBox(); jc.addItem("France"); jc.addItem("Germany"); jc.addItem("Italy"); jc.addItem("Japan"); jc.addItemListener(this); add(jc);/*from w w w .j a v a 2s . co m*/ jc.setActionCommand("Action"); String cmd = jc.getActionCommand(); }
From source file:Main.java
public Main() { JComboBox jc = new JComboBox(); jc.addItem("France"); jc.addItem("Germany"); jc.addItem("Italy"); jc.addItem("Japan"); jc.addItemListener(this); add(jc);/* w w w .ja v a 2 s. c om*/ jc.showPopup(); }