×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    7

    how to display gif?

    Hello,

    i'm trying to display gif in my application, but without any result. :-(
    Can somebody send me a simple example how to do this?

    Tia,
    P.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    7

    RE: how to display gif?

    Ups, I forgot something:

    I'm trying to display it on N9210.

    grets,
    p.

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    88

    RE: how to display gif?

    Hi, it should be work

    ImgFiles = getClass().getResource(fileName);
    Image = toolkit.getImage(urlImgFiles);

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    88

    RE: how to display gif?

    You are quite right, but in my code I add image to MediaTracer as well, in next

    MediaTracker trac =new MediaTracker(this);

    // load Image
    .....
    .....
    //

    trac.addImage(image, 0);
    try
    {
    trac.waitForAll();
    }
    catch (InterruptedException e){}

    one more, I am not sure but, try use file name string as "/image.gif" if you load file from jar root.

    Dima

Posting Permissions

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