Java jtattoo conflict with customize cursor

105 views Asked by At

I am doing a java swing application and I use jtattoo look and feel(graphite). I also have code to customize the cursor:

Toolkit toolkit=Toolkit.getDefaultToolkit();
Image image=toolkit.getImage("images/swordCursor.png");
Point hotSpot=new Point(0,0);
Cursor cursor=toolkit.createCustomCursor(image, hotSpot, "Sword");
setCursor(cursor);

I don't understand why the image cursor works fine without jtattoo look and feel, but it doesn't work with jtattoo graphite look and feel activated.

EDIT: After execute the application, if the cursor is over a button, the image of the cursor (sword) could be seen, but when the cursor leaves the button, the cursor turn to default image.

1

There are 1 answers

0
Seven On BEST ANSWER

Oh, I understand now, I see my mistake. The problem is in the line below:

setCursor(cursor);

the correct one is:

getContentPane().setCursor(cursor);