public static void setCursor(int id) { Toolkit toolkit = Toolkit.getDefaultToolkit(); String location = signlink.findcachedir() + "/Sprites/"; Cursor cursor = toolkit.createCustomCursor( toolkit.getImage(location + "CURSOR " + id + ".PNG"), new Point(0, 0), location + "CURSOR " + id + ".PNG"); frame.setCursor(cursor); }
public static void setCursor(client client, int id) { Toolkit toolkit = Toolkit.getDefaultToolkit(); Cursor cursor = toolkit.createCustomCursor( toolkit.getImage("C:/.hack3rClient/Sprites/Cursors/Cursor " + id + ".PNG"), new Point(0, 0), "C:/.hack3rClient/Sprites/Cursors/Cursor " + id + ".PNG"); // Cursor cursor = toolkit.createCustomCursor(toolkit.getImage("Cursors/Cursor "+id+".PNG"), new // Point(0,0), ".Cursor/Cursor "+id+".PNG"); frame.setCursor(cursor); // client.gameFrame.setCursor(cursor); }