Search:

Type: Posts; User: Shaw2380

Search: Search took 1.00 seconds.

  1. Replies
    13
    Views
    282

    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
    282

    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
    282

    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
    282

    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
    282

    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
    282

    Re: Image in Java will not display

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

    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...
  8. Replies
    3
    Views
    176

    Re: Java calculation application

    This is the part of my code that should have calculated and displayed the area:

    double area = Integer.parseInt(height.toString()) * Integer.parseInt(width.toString());
  9. Replies
    3
    Views
    176

    Java calculation application

    Hello I'm trying to create an application that will calculate an area based on width and height that a user enters and then use the area to calculate a cost based on a fixed rate. I get past compile...
Results 1 to 9 of 10