From 77a86250f12bd026c0fac6ba6cd6ff3f196f1d95 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 30 May 2009 11:35:47 +0000 Subject: Fix GLCapsTableDemo git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@337 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/misc/GLCapsTableDemo.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/demos/misc/GLCapsTableDemo.java b/src/demos/misc/GLCapsTableDemo.java index 44314fb..412954c 100755 --- a/src/demos/misc/GLCapsTableDemo.java +++ b/src/demos/misc/GLCapsTableDemo.java @@ -134,6 +134,7 @@ public class GLCapsTableDemo int windowSystemRecommendedChoice) { int row = capsTable.getSelectedRow(); + if ( 0> row || row >= indices.size() ) return windowSystemRecommendedChoice; int desiredCapIndex = ((Integer) indices.get(row)).intValue(); if ( updateLR ) { @@ -173,6 +174,9 @@ public class GLCapsTableDemo private void initComponents() { + pane = new JPanel(); + pane2 = new JPanel(); + // Hack: use multisampled capabilities to pick up more detailed information on Windows GLCapabilities multisampledCaps = new GLCapabilities(); multisampledCaps.setSampleBuffers(true); @@ -191,8 +195,6 @@ public class GLCapsTableDemo // canvas2.setPreferredSize(defdim); // canvas2.setMaximumSize(defdim); animator.add(canvas2); - pane = new JPanel(); - pane2 = new JPanel(); pane.add(canvas); pane2.add(canvas2); canvasPane = new JSplitPane(); -- cgit v1.2.3