/** * Returns the value currently selected. * * @return the value currently selected */ public E getValue() { ImageIcon icon = (ImageIcon) getSelectedItem(); return E.valueOf(enumeration, icon.getDescription()); }