Using this method :

javax.swing.ImageIcon ii = new ImageIcon(url);
ApplicationContext.DisplayHost displayHost = display.getDisplayHost();
java.awt.Cursor CUSTOM_CURSOR =
Toolkit.getDefaultToolkit().createCustomCursor(ii.getImage(), new Point(10,
30), "");
displayHost.setCursor(CUSTOM_CURSOR);

The new cursor "CUSTOM_CURSOR" appears a few times but still not persist on
the screen.

Can someone help me.
thank you.



-----Message d'origine-----
De : Greg Brown [mailto:[email protected]] 
Envoyé : jeudi 11 novembre 2010 14:12
À : [email protected]
Objet : Re: TR: Custom Cursor

Actually, there is currently no way to specify an application-defined
cursor. You can only use the stock cursors defined by the Cursor enum. You
can specify a cursor for a given Component via the "cursor" property, or you
can manually change the cursor using the Mouse class when the mouse is
captured.

G

On Nov 11, 2010, at 4:27 AM, Jérôme Serré wrote:

> 
> 
> 
> 
> De : Jérôme Serré [mailto:[email protected]] 
> Envoyé : jeudi 11 novembre 2010 10:24
> À : 'Jérôme Serré'; [email protected]
> Objet : RE: Custom Cursor
> 
> 
> 
> I think, i have to use the ‘Mouse’ class.
> 
> Forget My question J
> 
> 
> 
> De : Jérôme Serré [mailto:[email protected]] 
> Envoyé : jeudi 11 novembre 2010 09:40
> À : '[email protected]'
> Objet : Custom Cursor
> 
> 
> 
> Hello,
> 
> 
> 
> Is it possible to create a Custom Cursor with any image ?
> 
> Thanks for your response.
> 
> 
> 
> --
> 
> Jérôme Serré
> 
> 
> 
> 

Reply via email to