I'm still not sure what is going on. I tried / instead of \ but it still doesn't show the image. Does Java not allow someone to display images made in paint or anything with a png extenstion?
Type: Posts; User: Shaw2380
I'm still not sure what is going on. I tried / instead of \ but it still doesn't show the image. Does Java not allow someone to display images made in paint or anything with a png extenstion?
This is the exact path, however it gives an error illegal escape character. Is it impossible or something to display an image in Java? I remember I had a project in my Java programming class that...
I tried to run the debugger to see but I can't copy and paste from the debugger. It just says for ImageIcon icon = <object reference> for local variables if that helps any.
I'm not sure what you mean by the File object. The image is a png file and it is in My Pictures. I'm not sure where on my laptop the My Pictures is located, such as the C:/ drive.
I'm not sure but it appears nothing displays and no error. Here is some of my code which includes the lines to display the image, which it doesn't:
ImageIcon icon = new ImageIcon("J Pipe's...
I think it is an addActionListener but I'm not sure.
Hello I'm not getting any errors but for some reason my image won't display. Also the picture is a png image. Here is my code that should display the image:
ImageIcon icon = new...