dcsimg

How do you change the cursor over a JApplet? It seems to be different than for an Applet.

John Zukowski

Setting the cursor over a JApplet is no different than an Applet. Just change the parent class from the Applet cursor changing FAQ.


import java.awt.*;
import java.applet.*;
import javax.swing.*;

public class Test extends JApplet {

  public void init() {
	
    setCursor(new Cursor(
      Cursor.HAND_CURSOR));
        
    }
}