This is a part of the code for building a beatbox. It was given in the Head First Java book.
Problem is in line no. 22. Here a controller event is being created but I couldn't understand why. We haven't even created an event listener to listen to that event. In fact we don't need an event listener because this program is completely GUI and we have JButtons for firing events which are listened to by their respective listener objects. So what purpose does this command serve? In any case if you look carefully, you'll see that this event is being created on the 17th beat(beat no 16), though we don't need a 17th beat here. This program was supposed to have 16 instruments each having 16 beats. Your help will be greatly appreciated. Thanks!