Serious Problem with JComboBox
When the model of a combo box is changed by setting it to a certain index, usually using setSelectedIndex() or setSelectedItemAt(int index), the software (code) calls actionPerformed. This results in multiple stack calls to actionPerformed, that then unwind. This is undesirable if you have other code in actionPerformed that should only be go through once per actionPerformed call. Essentially combobox is like a recursive function.
How can you prevent this?
Here's more detail:
if ( event.getSource() == monthBox || event.getSource == yearBox )
So every time setSelectedIndex or setSelectedItem is used on a combo box, it calls actionPerformed multiple times before even finishing the first original actionPerformed call.