Javaでカーソルのサイズを変更したい。だから誰かが私にこれを行う方法を教えてもらえますか?グーグルで検索しましたが、解決策が見つかりませんでした。以下は、カーソルのサイズを変更しようとしているコードです。
Toolkit toolkit = Toolkit.getDefaultToolkit();
InputStream imgStream = this.getClass().getResourceAsStream("/resources/move_cursor.gif");
BufferedImage bi = new BufferedImage(10,10, BufferedImage.TYPE_INT_RGB);
try {
bi = ImageIO.read(imgStream);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
Point hotspot = new Point(0,0);
ImageIcon myImg = new ImageIcon(bi);
Image image = myImg.getImage();
toolkit.getBestCursorSize(10, 10);
Cursor cursor = toolkit.createCustomCursor(image,hotspot ,"Custom Cursor");
setCursor(cursor);
このコードはカーソル(画像)を変更しましたが、カーソルのサイズは変更していません。その解決策を教えてください。
ありがとう