public void paint(Graphics g){
  g.translate(0,translateY);
  super.paint(g);
}

public void paint ( Graphics g ) { g . translate ( 0 , translateY ) ; super . paint ( g ) ; }
displays our component in the location ( 0 , translatey ) . note that this changes only the rendering location of the button , not the physical location of it . note , also , that rendering into g will be clipped to the physical location of the button , so the button will disappear as it moves away from that location .
