They're great if you have em.
Type: Posts; User: Norm
They're great if you have em.
Its better to copy and paste from the actual program than to try to remember what the code was.
Now that you have the code working, you need to rework it. Putting the JFrame code in the gui...
Please copy and post the full text of the error message here.
What was the code you posted supposed to do?
What is the 'j' variable?
Your problem has nothing to do with images. It has to do...
Ok go back and read my post#8 again.
Did you do what I said on the last line of the post: you need to add the JPanel(this) to the frame.
Does it work now?
Did you read my last post? I pointed out several problems with your code and showed consoles where "hey" is printed.
The code works with those changes.
BTW This would show you a problem: ...
I disagree. For debugging one time, its useful to see when/if a method is being called. I use print statements a lot to verify that. Then remove them after the they've shown what is happening.
If...
Try using the ImageIO class for reading the image.
Is the image file being found by the program? What is the value of img after the getImage call?