From 4bb80be7b43d518c1525ba4bae8c99638d00c0cf Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 5 Sep 2016 14:37:07 +0200 Subject: [PATCH] Updated comments for Swing active rendering --- Dorkbox-Util/src/dorkbox/util/swing/ActiveRenderLoop.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dorkbox-Util/src/dorkbox/util/swing/ActiveRenderLoop.java b/Dorkbox-Util/src/dorkbox/util/swing/ActiveRenderLoop.java index 51c2536..26bfa49 100644 --- a/Dorkbox-Util/src/dorkbox/util/swing/ActiveRenderLoop.java +++ b/Dorkbox-Util/src/dorkbox/util/swing/ActiveRenderLoop.java @@ -4,6 +4,7 @@ import java.awt.Graphics; import java.awt.Toolkit; import java.awt.image.BufferStrategy; +import javax.swing.JComponent; import javax.swing.JFrame; import dorkbox.util.ActionHandlerLong; @@ -19,7 +20,10 @@ class ActiveRenderLoop implements Runnable { /** * How many frames per second we want the Swing ActiveRender thread to run at * - * NOTE: The ActiveRenderLoop replaces the Swing EDT in order to enable smoother animations. + * NOTE: The ActiveRenderLoop replaces the Swing EDT (only for specified JFrames) in order to enable smoother animations. It is also + * important to REMEMBER -- if you add a component to an actively managed JFrame, YOU MUST make sure to call + * {@link JComponent#setIgnoreRepaint(boolean)} otherwise this component will "fight" on the EDT for updates. You can completely + * disable the EDT by calling {@link NullRepaintManager#install()} */ public static int TARGET_FPS = 30;