Cursor.WAIT_CURSOR has the following syntax.
public static final int WAIT_CURSOR
In the following code shows how to use Cursor.WAIT_CURSOR field.
import java.awt.Cursor; //from ww w.j a va 2 s . com 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.getPredefinedCursor(Cursor.WAIT_CURSOR)); aWindow.setVisible(true); } }