aboutsummaryrefslogtreecommitdiffstats
path: root/demos/SwingDemos
diff options
context:
space:
mode:
Diffstat (limited to 'demos/SwingDemos')
-rw-r--r--demos/SwingDemos/factoryhack.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/demos/SwingDemos/factoryhack.txt b/demos/SwingDemos/factoryhack.txt
new file mode 100644
index 0000000..7f621ad
--- /dev/null
+++ b/demos/SwingDemos/factoryhack.txt
@@ -0,0 +1,16 @@
+
+ //Set up the GUI.
+ GLCapabilities caps = new GLCapabilities();
+ Canvas cvs = null;
+ GLDrawableFactory gldf = GLDrawableFactory.getFactory();
+ if(gldf instanceof SunJDK13GLDrawableFactory)
+ {
+ SunJDK13GLDrawableFactory sgldf =
+ (SunJDK13GLDrawableFactory)gldf;
+ GraphicsConfiguration grcfg =
+ sgldf.getGraphicsConfiguration(caps);
+ cvs = new Canvas (grcfg);
+ } else {
+ cvs = new Canvas ();
+ }
+ cvs.