How to get cursor image?
I'm trying to take screen capture by using a Robot class. And because the image created by Robot class does not include cursor, I need to draw the cursor into the image.
So far I use the following code:
But the problem is, how do I get the cursor image?
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Image image = robot.createScreenCapture(new Rectangle(screenSize));
Point point = MouseInfo.getPointerInfo().getLocation();
Cursor cursor = Cursor.getDefaultCursor();
Or is there some other way to draw the cursor into the image?