• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

awt cursor question

 
Stephanie Grasson
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try
Cursor cursor = new Cursor(Cursor.HAND_CURSOR);
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic