diff options
Diffstat (limited to 'src/demos/applets/JOGLNewtAppletBase.java')
-rwxr-xr-x | src/demos/applets/JOGLNewtAppletBase.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/demos/applets/JOGLNewtAppletBase.java b/src/demos/applets/JOGLNewtAppletBase.java index 5f85715..c8c6ac6 100755 --- a/src/demos/applets/JOGLNewtAppletBase.java +++ b/src/demos/applets/JOGLNewtAppletBase.java @@ -60,7 +60,7 @@ public class JOGLNewtAppletBase extends WindowAdapter implements KeyListener, Mo Object instance = null; try { - Class clazz = Class.forName(clazzName); + Class<?> clazz = Class.forName(clazzName); instance = clazz.newInstance(); } catch (Throwable t) { t.printStackTrace(); @@ -139,9 +139,6 @@ public class JOGLNewtAppletBase extends WindowAdapter implements KeyListener, Mo glWindow.setVisible(true); glAnimator.start(); awtParent = glWindow.getParent(); - if(null==awtParent) { - throw new RuntimeException("Parent of GLWindow is null: "+glWindow); - } } } @@ -209,7 +206,9 @@ public class JOGLNewtAppletBase extends WindowAdapter implements KeyListener, Mo glWindow.setUndecorated(!glWindow.isUndecorated()); } if(e.getKeyChar()=='f') { glWindow.setFullscreen(!glWindow.isFullscreen()); - } else if(e.getKeyChar()=='r') { + } else if(e.getKeyChar()=='a') { + glWindow.setAlwaysOnTop(!glWindow.isAlwaysOnTop()); + } else if(e.getKeyChar()=='r' && null!=awtParent) { if(null == glWindow.getParent()) { glWindow.reparentWindow(awtParent); } else { |