java.awt.Point absolute_panel_location(){
  int x=scroll_pane.getX();
  int y=scroll_pane.getY();
  java.awt.Container curr_parent=scroll_pane.getParent();
  while (curr_parent != null) {
    x+=curr_parent.getX();
    y+=curr_parent.getY();
    curr_parent=curr_parent.getParent();
  }
  return new java.awt.Point(x,y);
}

java . awt . Point absolute_panel_location ( ) { int x = scroll_pane . getX ( ) ; int y = scroll_pane . getY ( ) ; java . awt . Container curr_parent = scroll_pane . getParent ( ) ; while ( curr_parent != null ) { x += curr_parent . getX ( ) ; y += curr_parent . getY ( ) ; curr_parent = curr_parent . getParent ( ) ; } return new java . awt . Point ( x , y ) ; }
calculates the absolute location of the board frame in his outmost parent frame .
