示例#1
0
  public void init() {

    if (mouse == null) {
      mouse = new MyMouseAdapter();
      this.addMouseListener(mouse);
    }
    super.init();
  }
示例#2
0
  public void imageReady(boolean skipFrame) {

    if (!Globals.focused) {
      setFocusable(true);
      requestFocus();
      Globals.focused = true;
    }

    // Draw image first:
    super.imageReady(skipFrame);

    frameFinished = true;
  }