Example usage for javax.swing MutableComboBoxModel getSize

List of usage examples for javax.swing MutableComboBoxModel getSize

Introduction

In this page you can find the example usage for javax.swing MutableComboBoxModel getSize.

Prototype

int getSize();

Source Link

Document

Returns the length of the list.

Usage

From source file:com.anrisoftware.prefdialog.miscswing.comboboxhistory.HistoryComboBoxModel.java

private Set<Object> fromModel(MutableComboBoxModel model) {
    Set<Object> set = new HashSet<Object>(model.getSize());
    for (int i = 0; i < model.getSize(); i++) {
        set.add(model.getElementAt(i));//from  w w  w.j a  v a2 s.c  o m
    }
    return set;
}