Example usage for javax.swing JComboBox getSelectedObjects

List of usage examples for javax.swing JComboBox getSelectedObjects

Introduction

In this page you can find the example usage for javax.swing JComboBox getSelectedObjects.

Prototype

@BeanProperty(bound = false)
public Object[] getSelectedObjects() 

Source Link

Document

Returns an array containing the selected item.

Usage

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.  co  m

    Object[] objs = jc.getSelectedObjects();
}