It was pseudo code. If I have a gui with a component displayed and I want to set the cursor for the component, ie, when the mouse is over that particular component the cursor will be set according to what I specified for the component, and if the component is:
JPanel panel = new JPanel();
// The "panel" is the reference to the Component that we use to set the cursor.
// Since JPanel extends from Component we can use the (inherited) Component
// method setCursor on the "panel" reference.
panel.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
If you do not like the System cursor you can make an image of what you want and use it with the Toolkit.
createCustomCursor method to make what you want.