: k, this is the program:
: *********************************
: import java.awt.*;
: import java.applet.*;
: import javax.swing.ImageIcon;
:
: public class mouse extends Applet{
:
: Image b;
:
: public void init() {
: ImageIcon icon = new ImageIcon("sani.gif");
: Image a = icon.getImage();
:
: final java.awt.Cursor myCursor = java.awt.Toolkit.getDefaultToolkit().createCustomCursor(a,new java.awt.Point(8,8),"test");
: setCursor(myCursor);
:
: b=getImage(getCodeBase(),"sani.gif");
: }
:
: public void paint(Graphics g)
: {
: g.drawImage(b,50,50,this);
: }
: }
: ***************************************
: i can see the picture from paint, but i cannot see the cursor at all
: pls another hint???
: tks vvvvvvv much
:
Have you tried this.
import java.awt.*;
: import java.applet.*;
: import javax.swing.ImageIcon;
:
: public class mouse extends Applet{
:
: Image b;
:
: public void init() {
b=getImage(getCodeBase(),"sani.gif");
: //ImageIcon icon = new ImageIcon("sani.gif");
: //Image a = icon.getImage();
:
: final java.awt.Cursor myCursor = java.awt.Toolkit.getDefaultToolkit().createCustomCursor(b,new java.awt.Point(8,8),"test");
: setCursor(myCursor);
:
:
: }
:
: public void paint(Graphics g)
: {
: g.drawImage(b,50,50,this);
: }
: }