N
nono_jun
Hi. I have problem related with swing component.
I want to change a cursor which is a default icon in windows xp.
(C:/WINDOWS/Cursors/stopwtch.ani) -> animation icon. Icon move like
clock rinigng.
But Because of the file description ( .ani, and .cur. ) I can't use
that icon in swing component.
Cursor works invisiblely. Java doc says that when cursor is inable ,
Icon become trasparent.
When I use jpg format for below logic, it was working well.
So is there any way to use that file for cursor ?
logic is here.----------------------------------
File file = new File("C:/WINDOWS/Cursors/stopwtch.ani");
if(file.exists()){
Image image = Toolkit.getDefaultToolkit().getImage("C:/WINDOWS/Cursors/
stopwtch.ani");
Point point = new Point(0, 0);
Cursor cursor = this.getToolkit().createCustomCursor(image, point,
"stopwtch");
glassPane.setVisible( true ) ;
glassPane.setCursor(cursor);
--------------------------------------------
I want to change a cursor which is a default icon in windows xp.
(C:/WINDOWS/Cursors/stopwtch.ani) -> animation icon. Icon move like
clock rinigng.
But Because of the file description ( .ani, and .cur. ) I can't use
that icon in swing component.
Cursor works invisiblely. Java doc says that when cursor is inable ,
Icon become trasparent.
When I use jpg format for below logic, it was working well.
So is there any way to use that file for cursor ?
logic is here.----------------------------------
File file = new File("C:/WINDOWS/Cursors/stopwtch.ani");
if(file.exists()){
Image image = Toolkit.getDefaultToolkit().getImage("C:/WINDOWS/Cursors/
stopwtch.ani");
Point point = new Point(0, 0);
Cursor cursor = this.getToolkit().createCustomCursor(image, point,
"stopwtch");
glassPane.setVisible( true ) ;
glassPane.setCursor(cursor);
--------------------------------------------