Here you can find the source of CargarComboBox(JComboBox cb, List
public static <T> void CargarComboBox(JComboBox cb, List<T> lista)
//package com.java2s; //License from project: Open Source License import java.util.List; import java.util.Vector; import javax.swing.DefaultComboBoxModel; import javax.swing.JComboBox; public class Main { public static <T> void CargarComboBox(JComboBox cb, List<T> lista) { Vector<T> v = new Vector<T>(); for (T p : lista) { v.add(p);// www . ja v a2s . c om } cb.setModel(new DefaultComboBoxModel<T>(v)); } }