Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

mouse arrow

  Asked By: Robert    Date: Mar 06    Category: Java    Views: 657

i want to hide the mouse arrow whenever i run my application so that
it acts like a screensaver. i included this codes and when i run
it,my screen will not show up..can anyone help me with this..thanks..

//an image show in the middle of the screen
img = Toolkit.getDefaultToolkit().getImage("action_b.gif");
cp.add(new JLabel(new ImageIcon(img)));

ImageIcon blank = new ImageIcon("star.gif");
Cursor cr = Toolkit.getDefaultToolkit().createCustomCursor
(blank.getImage(), new Point(0, 0), "Blank");

i have tried cp.setCursor(cr);
and it too doesn't work..



1 Answer Found

Answer #1    Answered By: Ella Brown     Answered On: Mar 06

ONe chicky Solution is that
Your are creatign custom cursor
and you have some "star.gif " as an image  ( according
to the example you have mentioned )

now make this image of very small size (1*1)

I know this is not good technical solution
but still if this is one way .. :-)

Didn't find what you were looking for? Find more on mouse arrow Or get search suggestion and latest updates.