Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
 }
  public BitmapTest() {
    super("Opaque Bitmap Test");
    setSize(640, 480);
    setVisible(true);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    Toolkit tk = Toolkit.getDefaultToolkit();
    image = tk.getImage(getURL("asteroid1.png"));

    gameloop = new Thread(this);
    gameloop.start();
  }
Esempio n. 4
0
 public void init() {
   Toolkit tk = Toolkit.getDefaultToolkit();
   image = tk.getImage(getURL("castle.png"));
   addKeyListener(this);
 }