wood burning stoves
The moose likes Beginning Java and the fly likes HFJ BeatBox program, problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HFJ BeatBox program, problems" Watch "HFJ BeatBox program, problems" New topic

HFJ BeatBox program, problems

Davy Kelly
Ranch Hand

Joined: Jan 12, 2004
Posts: 384
Hey everyone,

I am going though the Head First Java 2nd ed nicely.

I made up the BeatBox program on chapter 13 page 420, and it worked nicely.

I was finished chapter 14 and tried to add in the inner classes to make the program save the beat.

and add in more buttons for this to happen.

I done all that, and it came up with many errors, so many in fact that it said the original program was wrong.

so I undid all the changes, and tried to compile, now I went through the program with a fine tooth comb, it is perfectly the same as the book, so it should work again, but it will not compile.

I have noticed that there was a program on page 437 called Box, whixh I made up, as I like to see things work, so I understand them.

I have since got rid of this class Box, cause I think this was making the main BeatBox program not work.

However, I still get lots of errors, and I am not sure why as it worked before with the exact same code.

here is my beatbox code:

here is a screen shot of my errors which I never got the last time.

can someone help?


[ November 23, 2006: Message edited by: Davy Kelly ]
[ November 23, 2006: Message edited by: Davy Kelly ]

How simple does it have to be???
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2398
According to your output the problem is in the class Box. If you look at the individual errors, they will tell you what is expected.
Davy Kelly
Ranch Hand

Joined: Jan 12, 2004
Posts: 384

What I was asking is why did it compile fine and run fine in the first place?
ok I made a few changes, but I have set the code back to its original working order, so it should work fine now, but its not

Davy Kelly
Ranch Hand

Joined: Jan 12, 2004
Posts: 384
I have downloaded the code from O'reilly the Code Kitchen jar file.

I extracted the files and saved the BeatBoxSaveOnly.java file in where all my other java files save and get compiles from.

I compiled this file, and this returned 11 errors.

again saying there is a problem with the Box class, which I see is a class within the java language.

I am at a loss, I have spent all day trying to figure this out, but to no avail.

I cannot add buttons to the buttonBox, as the main problem is with the class Box.

Can someone help please, instead of telling me the compilation errors tell me what the problem is?

[ November 24, 2006: Message edited by: Davy Kelly ]
I agree. Here's the link: http://aspose.com/file-tools
subject: HFJ BeatBox program, problems
It's not a secret anymore!