aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index a23263a8f..a510efc10 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -661,10 +661,17 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
try {
- disableBackgroundEraseMethod =
- getToolkit().getClass().getDeclaredMethod("disableBackgroundErase",
- new Class[] { Canvas.class });
- disableBackgroundEraseMethod.setAccessible(true);
+ Class clazz = getToolkit().getClass();
+ while (clazz != null && disableBackgroundEraseMethod == null) {
+ try {
+ disableBackgroundEraseMethod =
+ clazz.getDeclaredMethod("disableBackgroundErase",
+ new Class[] { Canvas.class });
+ disableBackgroundEraseMethod.setAccessible(true);
+ } catch (Exception e) {
+ clazz = clazz.getSuperclass();
+ }
+ }
} catch (Exception e) {
}
return null;