package eu.tankernn.accounts.frame; import java.util.List; import javax.swing.ComboBoxModel; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultListModel; public class GUIUtils { public static DefaultListModel listModelFromList(List list) { DefaultListModel model = new DefaultListModel(); for (T a : list) model.addElement(a); return model; } public static ComboBoxModel comboBoxModelFromList(List list) { DefaultComboBoxModel model = new DefaultComboBoxModel(); for (T a : list) model.addElement(a); return model; } }