switched to a ItemListener instead of ActionListener so that it gets
activated too when the program changes the checkbox state.