diff options
author | Sven Gothel <[email protected]> | 2001-03-14 23:53:56 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2001-03-14 23:53:56 +0000 |
commit | b7f7eee96facb114a3dfe11bf70a6d6f3b1299b9 (patch) | |
tree | bd014f2ab852e477fa33fa125902e0e0a792b147 /demos/HodglimsNeHe/Lesson1.java | |
parent | 86443be0a3795fa860850f0cf81ae7cc6843858d (diff) |
some little bug fixes post v. 2.6.0
Diffstat (limited to 'demos/HodglimsNeHe/Lesson1.java')
-rw-r--r-- | demos/HodglimsNeHe/Lesson1.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/demos/HodglimsNeHe/Lesson1.java b/demos/HodglimsNeHe/Lesson1.java index b1e883b..3cbdf93 100644 --- a/demos/HodglimsNeHe/Lesson1.java +++ b/demos/HodglimsNeHe/Lesson1.java @@ -83,6 +83,46 @@ public class Lesson1 extends Applet }
+ public static void main( String args[] ) {
+ Lesson1 applet =
+ new Lesson1();
+
+ Frame f = new Frame("Lesson1");
+
+ GLContext.gljNativeDebug = true;
+ GLContext.gljThreadDebug = false;
+ GLContext.gljClassDebug = true;
+
+ f.addWindowListener( new WindowAdapter()
+ {
+ public void windowClosed(WindowEvent e)
+ {
+ System.exit(0);
+ }
+ public void windowClosing(WindowEvent e)
+ {
+ windowClosed(e);
+ }
+ }
+ );
+
+ f.setLayout(new BorderLayout());
+ f.add("Center", applet);
+ applet.setSize(500,300);
+ applet.init();
+ applet.start();
+ Dimension ps = applet.getPreferredSize();
+ f.setBounds(-100,-100,99,99);
+ f.setVisible(true);
+ f.setVisible(false);
+ f.setVisible(true);
+ Insets i = f.getInsets();
+ f.setBounds(0,0,
+ ps.width+i.left+i.right,
+ ps.height+i.top+i.bottom);
+ f.setVisible(true);
+ }
+
private class renderCanvas extends GLAnimCanvas
implements KeyListener, MouseListener
|