See the BasicApplet.java file in Samples\DA\Java\Templates\BasicApplet.
Every DirectAnimation applet has two main pieces: the DXMApplet class and the Model class. The following steps show how to construct and initialize a simple DirectAnimation applet.
import com.ms.dxmedia.*;
If you import multimedia files using URLs, you must also import the Java libraries with:
import java.net.*;
//
// Class: MyApplet
//
class MyApplet extends DXMApplet {
public void init() {
super.init() ;
// Now set the model.
setModel(new MyModel());
}
}
//
// Class: MyModel
//
class MyModel extends Model {
public void createModel(BvrsToRun blist){
// Set the image that actually gets displayed
setImage(solidColorImage(blue));
}
}
<title> My Applet </title> <hr> <applet code=MyApplet.class width=200 height=200> </applet> <hr>
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.