void (PropertyChangeEvent evt) { listener.propertyChange(evt); if ("renderer".equals(evt.getPropertyName())) { if (!(list.getCellRenderer() instanceof MyDelegateRenderer)) { //noinspection unchecked list.setCellRenderer(new MyDelegateRenderer()); } } }