DBHelper.closeConnection();
return new DefaultComboBoxModel(items);
}
public static ListCellRenderer getListCellRenderer() {
return new DefaultListCellRenderer(){
@Override
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
Component renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (renderer instanceof JLabel && value instanceof Client) {
((JLabel) renderer).setText(((Client) value).getName().toString());