| Author |
Images don't appear in Swing code
|
Vonique Leary
Ranch Hand
Joined: Mar 24, 2008
Posts: 107
|
|
The following code is from Java In Easy Steps:
It is downloaded exactly from the book but no juggler appears and I can't figure out why.
http://www.ineasysteps.com/books/details/?1840780258 here are the images to get the pictures if anyone is interested in trying out the code.
Thanks,
Vonique
|
 |
Greg Brannon
Bartender
Joined: Oct 24, 2010
Posts: 530
|
|
I see you've commented out your main() method, which I assume is what you used to test the class. Explain what's going on there.
Also, the same main() method instantiates a Juggler object, jug, using the constructor Juggler(). You don't have a Juggler object defined or a constructor Juggler(). Are you sure you copied it directly from the book example? It doesn't make sense. Class names are capitalized by convention, which makes me think you've modified the book code, OR the book is non-standard.
|
Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
|
 |
Vonique Leary
Ranch Hand
Joined: Mar 24, 2008
Posts: 107
|
|
|
Never mind. Figured it out already. Thanks anyway!
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32595
|
|
Nice to see you again Please tell us how you sorted it out, because others might have the same problem in future.
|
 |
Vonique Leary
Ranch Hand
Joined: Mar 24, 2008
Posts: 107
|
|
Hi Campbell,
Well, it was just a case of not studying it adequately because there were a few labels and buttons missing. Those simple things were revealed upon closer inspection.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32595
|
|
|
Thank you.
|
 |
 |
|
|
subject: Images don't appear in Swing code
|
|
|