Search:

Type: Posts; User: copeg

Search: Search took 0.10 seconds.

  1. Replies
    12
    Views
    2,980

    [SOLVED] Re: I cant load the icon!!!!

    No. I just meant to reiterate Json's point - access your image relative to your application and not relying on something like:
    'c:/pictures/mercuryLogo.jpg' actually being there. Using the class...
  2. Replies
    12
    Views
    2,980

    [SOLVED] Re: I cant load the icon!!!!

    Sorry, I mis-read your original post and thought you were just trying to create an ImageIcon. Anyway, from a URL you could create a 'dummy' ImageIcon and retrieve the image that way (getImage()) or...
  3. Replies
    12
    Views
    2,980

    [SOLVED] Re: I cant load the icon!!!!

    An alternative method to load the image is to load it as a resource.



    java.net.URL imgURL = getClass().getResource(path); //where path is a string path relative to your class
    String pt =...
Results 1 to 3 of 3