public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(
list, value, index, isSelected, cellHasFocus);
label.setPreferredSize(new Dimension(presetWidth, presetHeight));
CameraPreset preset = (CameraPreset) value;
label.setIcon(preset.getIcon());
return label;
}
});
cameraPreset.addActionListener(cameraPresetListener);