public void set_action(int act) {
    currentAction=act;
    if (act==ACTION_RECT)
      statusBar.setText("hold down mouse button and draw rectangle, ESC to abort");
    else if (act==ACTION_CIRCLE)
      statusBar.setText("hold down mouse button and move right to set radius, ESC to abort");
    else if (act==ACTION_POLY)
      statusBar.setText("click to set points, double click sets last point, ESC to abort");
    else if (act==ACTION_ADDPOINT)
      statusBar.setText("click on polygon line to add point");
    else if (act==ACTION_DELPOINT)
      statusBar.setText("click on polygon point to remove it");
  }