FileDocCategorySizeDatePackage
Cursors.javaAPI DocExample1679Mon Sep 22 13:30:30 BST 1997None

Cursors

public class Cursors extends Applet
An applet that uses each of the predefined cursor types in a bunch of buttons.

Fields Summary
int[]
cursor_types
String[]
cursor_names
Constructors Summary
Methods Summary
public voidinit()
Create a grid of buttons each using a different cursor


             
     
    this.setLayout(new GridLayout(0, 2, 5, 5));
    for(int i = 0; i < cursor_types.length; i++) {
      Button b = new Button(cursor_names[i]);
      // This is how we obtain a Cursor object and set it on a Component
      b.setCursor(Cursor.getPredefinedCursor(cursor_types[i]));
      this.add(b);
    }