double buffering and createImage()

Discussion in 'Java' started by Rob Love, Jul 2, 2003.

  1. Rob Love

    Rob Love Guest

    Hey,

    I have a canvas in a applet that I want to draw on. My problem is that I
    don't know where to call createImage() to get my back buffer. I tried it in
    the constructor, but I keep getting null returned to me.

    Any suggestions?

    Thanks,

    //Rob
     
    Rob Love, Jul 2, 2003
    #1
    1. Advertising

  2. "Rob Love" <>, Wed, 02 Jul 2003 09:49:58 -0700:

    > Hey,


    Hi Rob,

    > I have a canvas in a applet that I want to draw on. My problem is that I
    > don't know where to call createImage() to get my back buffer. I tried it in
    > the constructor, but I keep getting null returned to me.
    > Any suggestions?
    > Thanks,
    > //Rob


    You have to make sure the component is 'realised' and displayable, I used
    to do this in the paint() method, but found some better suggestions over
    here:

    http://forum.java.sun.com/thread.jsp?forum=5&thread=367212&message=1557275
     
    dhek bhun kho, Jul 2, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. patrick

    createImage problem

    patrick, Dec 4, 2003, in forum: Java
    Replies:
    8
    Views:
    566
    patrick
    Dec 4, 2003
  2. Mike
    Replies:
    0
    Views:
    404
  3. vizlab
    Replies:
    3
    Views:
    4,252
    Michael Bar-Sinai
    Oct 17, 2007
  4. Sydex
    Replies:
    12
    Views:
    6,599
    Victor Bazarov
    Feb 17, 2005
  5. Thomas Fritsch
    Replies:
    2
    Views:
    1,040
    Andrey Kuznetsov
    Jul 27, 2006
Loading...

Share This Page