The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

override

Posted by Chin Loong on September 24, 2001 at 7:48 PM

> In Component of jdk1.2.2, there's a method called "isDoubleBuffered", which returns a boolean value depending whether things are doubleBuffered or not. I'm using Convas which is a subclass of Component. How do I set or enable double buffering? I've looked at all the methods and attributes and I haven't found a way to enable the double buffering. Please help!!

> Thanks,

> Jun

*snip*
isDoubleBuffered
public boolean isDoubleBuffered()

Returns true if this component is painted to an offscreen image ("buffer") that's copied to the screen later. Component subclasses that support double buffering should override this method to return true if double buffering is enabled.
Returns:
false by default
*/snip*

well, i haven't used this option yet, but if i'm not mistaken, u would have to override this method in your subclass to return true coz it returns false by default. just add a

public boolean isDoubleBuffered()
{
return true;
}

in your class i guess.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us