• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question from the BeatBox program in Head First Java.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic