public class TutorialExample extends Applet{
//Declaire variables needed to make the cursor
Cursor myCursor;
Image cursorImage;
Point hotPoint;
//A init method that makes and sets the cursor
public void init(){
cursorImage = getImage(getCodeBase(), "1.jpg"
Toolkit tk = getToolkit();
hotPoint = new Point(6,0);
myCursor = tk.createCustomCursor(cursorImage,hotPoint,"This is my custom Cursor"
setCursor(myCursor);
}//End init()
//The drawn part of the applet
public void paint(Graphics g){
g.setColor(Color.red);
}//End paint()
}//End TutorialExample
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.