Posted by hooligancat
on January 12, 2010 at 2:01 PM PST
I am using the following code to wipe the screen of any graphics items. In 1 player the graphics remain on screen.
public static Color m_transparent = new Color(0, 0, 0, 0);
Graphics2D g = (Graphics2D) m_component.getGraphics();
if (g != null)
g.fillRect(x, y, w, h);
I was under the impression that Toolkit.getDefaultToolkit().sync() ensures that the screen is upto date with any events. If this is the case is the final event not fillrect (in this case the values would be 0, 0, 1920, 1080), meaning clear?
Thanks in advance.