Java Cursor.toString()
Syntax
Cursor.toString() has the following syntax.
public String toString()
Example
In the following code shows how to use Cursor.toString() method.
import java.awt.Cursor;
//from w w w . j a va 2 s . c om
import javax.swing.JFrame;
public class Main {
public static void main(String[] args) {
JFrame aWindow = new JFrame();
aWindow.setBounds(200, 200, 200, 200);
aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Cursor cursor = Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR);
System.out.println(cursor.toString());
aWindow.setVisible(true);
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »