aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/javax/media
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-06-19 22:40:21 +0000
committerKenneth Russel <[email protected]>2006-06-19 22:40:21 +0000
commit7207ecf94eae68ca65530450fc6711281e38b30a (patch)
tree8b1d551a08176c56a22cdf2b1ba371a854bd6b65 /src/classes/javax/media
parente9d953d7d1ac59e35e75237132cd5649b4bde072 (diff)
Added workarounds for exceptions being thrown in NetBeans GUI builder
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@818 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/javax/media')
-rw-r--r--src/classes/javax/media/opengl/GLJPanel.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/classes/javax/media/opengl/GLJPanel.java b/src/classes/javax/media/opengl/GLJPanel.java
index be0b86121..192c5f1b1 100644
--- a/src/classes/javax/media/opengl/GLJPanel.java
+++ b/src/classes/javax/media/opengl/GLJPanel.java
@@ -42,6 +42,7 @@ package javax.media.opengl;
import java.awt.*;
import java.awt.geom.*;
import java.awt.image.*;
+import java.beans.*;
import javax.swing.*;
import java.nio.*;
import java.security.*;
@@ -716,6 +717,10 @@ public class GLJPanel extends JPanel implements GLAutoDrawable {
return joglContext;
} else {
if (!hardwareAccelerationDisabled) {
+ // Workaround for crashes in NetBeans GUI builder
+ if (pbuffer == null && Beans.isDesignTime()) {
+ return null;
+ }
return pbuffer.getContext();
} else {
return offscreenContext;
@@ -737,6 +742,10 @@ public class GLJPanel extends JPanel implements GLAutoDrawable {
public void setAutoSwapBufferMode(boolean onOrOff) {
if (!hardwareAccelerationDisabled) {
+ // Workaround for crashes in NetBeans GUI builder
+ if (pbuffer == null && Beans.isDesignTime()) {
+ return;
+ }
pbuffer.setAutoSwapBufferMode(onOrOff);
} else {
drawableHelper.setAutoSwapBufferMode(onOrOff);