summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/demos/misc/GLCapsTableDemo.java6
1 files 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();