• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question from the BeatBox program in Head First Java.  RSS feed

 
Y. Hussain
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!