List of usage examples for javax.swing JComboBox addItem
public void addItem(E item)
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 a v a2 s . co 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 . j a v a 2s.c o m 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. jav a 2 s.com*/ 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 www.ja v a 2 s . c o 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 ww .j a v a 2 s.c om 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 w w . j av a 2s .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 2 s .c o 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);/* www . j av a 2 s . c o m*/ jc.showPopup(); }
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 v a2s .com*/ jc.firePopupMenuWillBecomeVisible(); }
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);/* www. j a va 2 s . c om*/ jc.firePopupMenuWillBecomeInvisible(); }