Is it possible to not have to re type all of these almost identical procedures?
cancelSaveContactBtn.setVisible(false);
saveContactBtn.setVisible(false);
addCont
Technically if you intend to call the same method with the same parameter on a set of objects you could use a List to store your objects, iterate through and set an addActionListener
to each one.
List<Object> objects = new ArrayList<Object>();
objects.add(selectContactCBox);
objects.add(addContactBtn);
objects.add(personalRadio);
objects.add(businessRadio);
for(object o: objects){
o.addActionListener(this);
}