Cursor.getDefaultCursor() has the following syntax.
public static Cursor getDefaultCursor()
In the following code shows how to use Cursor.getDefaultCursor() method.
import java.awt.Cursor; /* w w w. j av a 2 s .co m*/ 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); aWindow.setCursor(Cursor.getDefaultCursor()); aWindow.setVisible(true); } }