Results 1 to 2 of 2
  1. #1
    ikkyu2 is offline Member
    Join Date
    Oct 2011
    Posts
    1
    Rep Power
    0

    Default Which folder do you put image files in

    Hi everyone. I have a project in which I have to display several images on a panel and I am not sure where to put the images. I have tried .bin .src etc... I might have had them in the correct folder but tried to access them incorrectly. This is the code I used to try to display them:
    Java Code:
    imageLabel.setIcon (new ImageIcon ("pic.gif");
    any help would be greatly appreciated.

  2. #2
    Solarsonic is offline Senior Member
    Join Date
    Mar 2011
    Posts
    261
    Rep Power
    4

    Default Re: Which folder do you put image files in

    It's relevant to the location of your class file.

    Most likely you're going to have to use a complete path starting from C:.

Similar Threads

  1. Folder & Files
    By Prajin in forum Advanced Java
    Replies: 14
    Last Post: 07-14-2010, 11:31 AM
  2. Selecting Files in a folder
    By ravjot28 in forum New To Java
    Replies: 1
    Last Post: 02-26-2010, 05:25 PM
  3. Replies: 2
    Last Post: 02-20-2009, 08:13 AM
  4. How To Place Three Files In A Folder
    By ramesh.8189 in forum AWT / Swing
    Replies: 4
    Last Post: 02-12-2009, 08:59 AM
  5. Placing Files In Folder
    By ramesh.8189 in forum New To Java
    Replies: 0
    Last Post: 02-06-2009, 01:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •