Forums Register Login

Head First Java, Ch12, MiniMusicPlayer3 not working as advertised

+Pie Number of slices to send: Send
I'm working through the above book and am stuck trying to find why the program doesn't run as I would expect. It compiles, it runs and it plays the midi track but there are no rectangles drawn in the panel. If I change to or remove the if statement entirely, then I get one rectangle drawn before any sound plays, so the paintComponent method is doing part of its job. I've tried running the program on both Linux F18 and OS X, with the same result. The full source (sorry, it's longish) is included below.

I was her plaything! And so was this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1199 times.
Similar Threads
HFJ Music Box Page 392
Java Class hangs after run
Head First Java problem
widget not loading in frame
MiniMusicPlayer HFJ
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 22:10:34.