int oldx = this.x; int oldy = this.y;  if (this.x == x && this.y == y) return; invalidate (); this.x = x; this.y = y; if (peer != null) peer.setBounds (x, y, width, height);   if (isLightweight() && width != 0 && height !=0) { parent.repaint(oldx, oldy, width, height); repaint(); }  if (oldx != x || oldy != y) { ComponentEvent ce = new ComponentEvent(this, ComponentEvent.COMPONENT_MOVED); getToolkit().getSystemEventQueue().postEvent(ce); }
setBounds(x, y, this.width, this.height);
  public void move(int x, int y)  {    int oldx = this.x;    int oldy = this.y;    if (this.x == x && this.y == y)      return;    invalidate ();    this.x = x;    this.y = y;    if (peer != null)      peer.setBounds (x, y, width, height);    // Erase old bounds and repaint new bounds for lightweights.    if (isLightweight() && width != 0 && height !=0)      {        parent.repaint(oldx, oldy, width, height);        repaint();      }    if (oldx != x || oldy != y)      {        ComponentEvent ce = new ComponentEvent(this,                                               ComponentEvent.COMPONENT_MOVED);        getToolkit().getSystemEventQueue().postEvent(ce);      }	}