SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:Check the Java Console in your system tray, there's probably an exception. Post the full stack trace here.
Campbell Ritchie wrote:It looks as if the problem is on line 12.
You have made things difficult for yourself by trying to write the whole thing in one go. You ought to do it bit by bit.
Try printing the code base URL and the toString method of the Image to screen; then you can narrow down where the error occurs: is it code base or is it the image?
And the length of your actionPerformed method is a good example of why addActionListener(this) is poor, non-object-oriented programming. Even though there are lots of books which show such code.
Campbell Ritchie wrote: . . . and have you done anything else with line 12?
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
On top of spaghetti all covered in cheese, there was this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|