for (int i = 0; i < comps.length; i++) {
if (comps[i] instanceof WidgetWrapper) {
WidgetWrapper wrapper = (WidgetWrapper) comps[i];
Widget widget = wrapper.widget();
if (widget instanceof DummyPlotWidget &&
e.widget.displayName().equals(widget.displayName())) {
removeWidget(wrapper);
}
}
}
repaint();