Here you can find the source of getNewDefaultComboBoxModel(ArrayList
Parameter | Description |
---|---|
itemsToStream | - the items to add to the model |
public static DefaultComboBoxModel getNewDefaultComboBoxModel(ArrayList<Class> itemsToStream)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import javax.swing.DefaultComboBoxModel; public class Main { /**//from w w w . j ava2 s . c om * Creates a new Default Combo Box Model from the ArrayList if items * @param itemsToStream - the items to add to the model * @return the new Default Combo Box Model populated with ArrayList items */ public static DefaultComboBoxModel getNewDefaultComboBoxModel(ArrayList<Class> itemsToStream) { DefaultComboBoxModel newModel = new DefaultComboBoxModel(); itemsToStream.stream().forEach((c) -> { newModel.addElement(c); }); return newModel; } }