Audizine - An Automotive Enthusiast Community

Results 1 to 11 of 11
  1. #1
    Veteran Member Four Rings
    Join Date
    Feb 11 2004
    AZ Member #
    85
    Location
    Seattle/Seoul

    java method: getImage

    Guest-only advertisement. Register or Log In now!
    ok trying to get an image to show up in a GWindow...

    i have tried:

    face = new ImageShape(BasicMatrixModel.getImage( java.lang.String ("bird.jpg")),0,0);

    and

    Image img = getImage("http://www.audizine.com/gallery/uploads/85/bird.jpg");

    both do not compile with errors about cannot resolve symbol, symbol: class lang

    i am oing this work in Dr. Java...

    i'd appreciate any help!

    thanks

    peace
    DBC ownz joo!! <- Wow what year is that from??

  2. #2
    Veteran Member Three Rings voodooA4's Avatar
    Join Date
    Feb 11 2004
    AZ Member #
    92
    Location
    USA

    what 'imports' are you using?
    98.5 Cactus Green A4 Quattro, APR Chipped
    114K Miles

    Open Source ECU: http://groups.yahoo.com/group/openecu/
    OpenDiag Group: http://groups.yahoo.com/group/opendiag/

  3. #3
    Veteran Member Four Rings
    Join Date
    Feb 11 2004
    AZ Member #
    85
    Location
    Seattle/Seoul

    package zoo;
    import sim.*;
    import uwcse.graphics.*;
    import java.awt.Image;
    import java.lang.*;
    DBC ownz joo!! <- Wow what year is that from??

  4. #4
    Veteran Member Three Rings
    Join Date
    Feb 25 2004
    AZ Member #
    894
    My Garage
    2002 TT
    Location
    San Diego

    Are your args correctly typed for getImage?

    Does it need to be a URL instead of a String?

  5. #5
    Veteran Member Three Rings voodooA4's Avatar
    Join Date
    Feb 11 2004
    AZ Member #
    92
    Location
    USA

    getImage takes a URL class argument, not a string (unless you use the 2nd prototype, which takes a URL and a string)...

    how about something like this:
    Image img = getImage(URL("http://www.audizine.com/gallery/uploads/85/bird.jpg"));
    98.5 Cactus Green A4 Quattro, APR Chipped
    114K Miles

    Open Source ECU: http://groups.yahoo.com/group/openecu/
    OpenDiag Group: http://groups.yahoo.com/group/opendiag/

  6. #6
    Veteran Member Four Rings
    Join Date
    Feb 11 2004
    AZ Member #
    85
    Location
    Seattle/Seoul

    voodoo: says cannot resolve symbol, symbol: method URL (java.lang.String)

    any ideas?

    thanks

    peace
    DBC ownz joo!! <- Wow what year is that from??

  7. #7
    Veteran Member Three Rings voodooA4's Avatar
    Join Date
    Feb 11 2004
    AZ Member #
    92
    Location
    USA

    sorry...try adding:

    import java.net.URL
    98.5 Cactus Green A4 Quattro, APR Chipped
    114K Miles

    Open Source ECU: http://groups.yahoo.com/group/openecu/
    OpenDiag Group: http://groups.yahoo.com/group/opendiag/

  8. #8
    Veteran Member Four Rings
    Join Date
    Feb 11 2004
    AZ Member #
    85
    Location
    Seattle/Seoul

    still not working...

    imported the above and have this:

    Image face = getImage(URL("http://www.audizine.com/gallery/uploads/85/bird.jpg"));

    and the error is the same as before... do i need to call URL method somewhere else?

    thanks

    peace
    DBC ownz joo!! <- Wow what year is that from??

  9. #9
    Veteran Member Four Rings
    Join Date
    Feb 11 2004
    AZ Member #
    85
    Location
    Seattle/Seoul

    what about using the ShapeImpl method?

    peace
    DBC ownz joo!! <- Wow what year is that from??

  10. #10
    Veteran Member Three Rings voodooA4's Avatar
    Join Date
    Feb 11 2004
    AZ Member #
    92
    Location
    USA

    hmm...my java skills are pretty limited, I dunno how much more I can help other than guessing...

    the only other thing I could tell you to try is (if it's an applet) to make an ImageViewer class, like so:

    ImageViewer myImage("http://www.audizine.com/gallery/uploads/85/bird.jpg");

    I'll keep looking around, and let you know if I find anything else...
    98.5 Cactus Green A4 Quattro, APR Chipped
    114K Miles

    Open Source ECU: http://groups.yahoo.com/group/openecu/
    OpenDiag Group: http://groups.yahoo.com/group/opendiag/

  11. #11
    Veteran Member Four Rings
    Join Date
    Feb 11 2004
    AZ Member #
    85
    Location
    Seattle/Seoul

    thanks man!! appreciate your help!!

    peace
    DBC ownz joo!! <- Wow what year is that from??

Bookmarks

Posting Permissions

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


    © 2001-2025 Audizine, Audizine.com, and Driverzines.com
    Audizine is an independently owned and operated automotive enthusiast community and news website.
    Audi and the Audi logo(s) are copyright/trademark Audi AG. Audizine is not endorsed by or affiliated with Audi AG.