Search:

Type: Posts; User: Shaw2380

Search: Search took 0.07 seconds.

  1. Replies
    13
    Views
    1,151

    Re: Image in Java will not display

    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?
  2. Replies
    13
    Views
    1,151

    Re: Image in Java will not display

    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...
  3. Replies
    13
    Views
    1,151

    Re: Image in Java will not display

    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.
  4. Replies
    13
    Views
    1,151

    Re: Image in Java will not display

    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.
  5. Replies
    13
    Views
    1,151

    Re: Image in Java will not display

    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...
  6. Replies
    13
    Views
    1,151

    Re: Image in Java will not display

    I think it is an addActionListener but I'm not sure.
  7. Replies
    13
    Views
    1,151

    Image in Java will not display

    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...
Results 1 to 7 of 7