Example usage for java.awt Button setCursor

List of usage examples for java.awt Button setCursor

Introduction

In this page you can find the example usage for java.awt Button setCursor.

Prototype

public void setCursor(Cursor cursor) 

Source Link

Document

Sets the cursor image to the specified cursor.

Usage

From source file:Main.java

public static void main(String[] args) throws HeadlessException, AWTException {
    Frame frame = new Frame();
    Button button1 = new Button("Ok");
    frame.add(button1, BorderLayout.NORTH);
    frame.setSize(50, 55);//from   w w  w.  java  2 s  .c  o  m
    frame.setVisible(true);

    button1.setCursor(Cursor.getSystemCustomCursor("MoveDrop.32x32"));
}