File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes awt cursor question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "awt cursor question" Watch "awt cursor question" New topic
Author

awt cursor question

Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
I have a frame window with super class Frame. My frame contains a canvas and when the cursor moves over the canvas, I want it to change to the hand cursor.
I did this by calling
Cursor canvasCursor = new Cursor(HAND_CURSOR);
myCanvas.setCursor(canvasCursor);
This works, but when I compile I get the following warning:
"NOTE: The variable HAND_CURSOR in class java.awt.Frame has been deprecated."
It tells me to consult the documentation for a better alternative. The documentation, however, does NOT list this variable as deprecated. Any ideas?
Bharathi Balasubramanian
Greenhorn

Joined: Jul 12, 2000
Posts: 26
Did you try
Cursor cursor = new Cursor(Cursor.HAND_CURSOR);


I got a flight to catch.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: awt cursor question
 
Similar Threads
drag and drop cursor
repaint () not getting called inside Canvas
a curious problem about canvas
Controlling Window Focus
cursor problems!!