aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render/opengl
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2006-11-23 22:50:18 +0000
committerCarsten Weisse <[email protected]>2006-11-23 22:50:18 +0000
commitbea899618bed414d47597d164d85dcbc244ad5ca (patch)
tree1635593f39e7cea181394213a0bfe447b88b626c /src/jake2/render/opengl
parent73182184a0e925ca319d133b4c3c4b7ee0ee7610 (diff)
use a java.awt.Frame instead of swing JFrame (hope this solves the 2 Pixel border flickering problem)
Diffstat (limited to 'src/jake2/render/opengl')
-rw-r--r--src/jake2/render/opengl/Jsr231Driver.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/jake2/render/opengl/Jsr231Driver.java b/src/jake2/render/opengl/Jsr231Driver.java
index cd874ee..7a9021f 100644
--- a/src/jake2/render/opengl/Jsr231Driver.java
+++ b/src/jake2/render/opengl/Jsr231Driver.java
@@ -2,7 +2,7 @@
* JoglCommon.java
* Copyright (C) 2004
*
- * $Id: Jsr231Driver.java,v 1.5 2006-11-23 18:10:32 cawe Exp $
+ * $Id: Jsr231Driver.java,v 1.6 2006-11-23 22:50:18 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -40,7 +40,6 @@ import java.util.LinkedList;
import javax.media.opengl.*;
import javax.swing.ImageIcon;
-import javax.swing.JFrame;
/**
* JoglCommon
@@ -54,7 +53,7 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
private GraphicsDevice device;
private DisplayMode oldDisplayMode;
private Display display;
- JFrame window;
+ Frame window;
// window position on the screen
int window_xpos, window_ypos;
@@ -157,7 +156,7 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
// destroy the existing window
shutdown();
- window = new JFrame("Jake2 (jsr231)");
+ window = new Frame("Jake2 (jsr231)");
ImageIcon icon = new ImageIcon(getClass().getResource("/icon-small.png"));
window.setIconImage(icon.getImage());
@@ -165,7 +164,7 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
// we want keypressed events for TAB key
canvas.setFocusTraversalKeysEnabled(false);
- window.getContentPane().add(canvas);
+ window.add(canvas);
canvas.setSize(newDim.width, newDim.height);
// register event listener