Test_001.java:20: <identifier> expected
container.setCursor(c);
^
Test_001.java:20: <identifier> expected
container.setCursor(c);
^
2 errors
Die erste Zeile verstehe ich noch, aber was passiert durch "container.setCursor(c);" ?
final Cursor c = Toolkit.getDefaultToolkit().createCustomCursor(
new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB),
new Point(0, 0),
"MyCursor");
public class TestCursor extends JFrame {
private static final long serialVersionUID = 1L;
public TestCursor() {
super("TestCursor");
final Cursor c = Toolkit.getDefaultToolkit().createCustomCursor(
new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB), new Point(0, 0), "MyCursor");
this.setCursor(c);
setSize(400, 400);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
}
public static void main(String [] args){
new TestCursor();
}
}