maybe store those 3 widgets in an array, and do something like
```
for(SomeCommonAncestorClass component : theComponentArray) {
   component.setSelected(false);
}

theComponentArray[index].setSelected(true);
```