QUICK NAVIGATOR
PRODUCTS
TECHNOLOGIES
DEVELOPMENT TOOLS
* News
* Java Media Framework
* Intel Animation for Java
* Intel Spatial Audio for Java
* Runtime Software License
* SDK Software License
* System Requirements
* Download Area
* Documentation Online
* Gallery
* General FAQ
* Support Information

[INTEL NAVIGATION HEADER]

Intel Animation for Java* Package Tutorial

Lesson 1: Using Surface and AnimCanvas



This applet creates an AnimCanvas and a Surface. The following command creates an AnimCanvas:

AnimCanvas animcanvas = new AnimCanvas(SURFACE_HEIGHT, SURFACE_WIDTH);

The AnimCanvas can be placed in your applet like any other awt component.

setLayout(new BorderLayout());
add("Center", animcanvas);

The AnimCanvas constructor automatically creates a surface. The surface can be accessed using the getSurface() method. In this applet, clicking the buttons changes the color of the Surface by calling

animcanvas.getSurface().setColor(COLOR);

After that, the new color is made visible by calling

animcanvas.repaint();

  Tutorial Contents Next Lesson

View Source

 

This page was last updated on Feb 11th, 1997.

Legal Stuff

Free Web Hosting