// set the selection state and update the GUI and loop dialog public void setSelected(boolean flag) { super.setSelected(flag); program.updateState(); program.updateLoopDialog(); }