Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

can anybody help in Flickering prob in Applet

  Asked By: Bill    Date: Jun 08    Category: Java    Views: 591

I am having problem that my applet flickers a very often .
actually i have a function which call repaint on mouse over. but i
wanna reduce that. If anybody can help me in this matter would be



3 Answers Found

Answer #1    Answered By: Jared Adams     Answered On: Jun 08

Try overriding the update function  of Applet:

public void update(Graphics g) {

Usually update first clears the display area and then calls paint().

Answer #2    Answered By: Tarrant Thompson     Answered On: Jun 08

but i dont get the graphics object at the time of calling update .. i
have not used createimage and the getGraphics to store the g..
so i am having problem. Is there any other solution u have

Answer #3    Answered By: Janelle Evans     Answered On: Jun 08

You don't have to call  update yourself, it is done automatically whenever it
is needed. You can force it to be called by calling repaint().

It is explained in more detail at http://newdata.box.sk/bx/java/httoc.html.
Look at
chapters 10 and 11.

Didn't find what you were looking for? Find more on can anybody help in Flickering prob in Applet Or get search suggestion and latest updates.