home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-10-10 | 1.2 KB | 59 lines |
- import java.awt.*;
- import java.awt.peer.ComponentPeer;
- import java.applet.*;
- import com.ms.com.*;
- import com.ms.awt.*;
- import com.ms.awt.peer.*;
- import com.ms.directX.*;
-
- public class TestGraph extends Applet
- {
- Flick s;
- FlickSurface f = null;
-
-
- ////////////////////////////////////////////////////////////////////////////
-
- public static void main(String args[])
- {
- TestGraphFrame frame = new TestGraphFrame("DirectX sample");
-
- //----------------------------------------------------------------------
- // Must show Frame before we size it so insets() will return valid values
- frame.show();
- frame.hide();
- frame.resize(640,480);
-
- TestGraph applet = new TestGraph();
-
- frame.add("Center", applet);
- applet.init();
- applet.start();
- frame.show();
- }
-
- //////////////////////////////////////////////////////////////////////////
- //
- // init
- //
- public void init()
- {
- s = new Flick();
-
- setLayout(new GridLayout(1, 1, 0, 0));
- add(s);
- s.addNotify();
- s.resize(640,480);
- s.show();
-
- f = s.doInit();
- if( f != null )
- f.start();
- }
-
- //////////////////////////////////////////////////////////////////////////
-
-
-
- }
-