public void OrientList()
  {	  	  
    cVertexList listCur;
    listCur = list;
    if (regime.equals(POLY2) && secndpoly && !firstpoly)
      listCur = list2;

    if( (firstpoly && listCur.n >= 3) || (secndpoly && listCur.n >= 3))
    {	   
      if (listCur.Ccw() != 1) {
	if (firstpoly)
	  listCur.ReverseList();
	else
	  listCur.ReverseList();
      }
    }
  }
}


class MesgFrame extends Frame
{

  Label ms;
  Button ok;

  MesgFrame(String title, String message)
  {
    setLayout(new GridLayout(2,1));
    setTitle(title);
    ms=new Label(message);
    ok= new Button("OK");
    add(ms);
    add(ok);
  }

  public boolean action(Event evt, Object o)
  {
    if (evt.target == ok) hide();
    return true;
  }

  public boolean handleEvent(Event evt) 
  {
    if (evt.id == Event.WINDOW_DESTROY)
    {
      dispose();
    }
    return super.handleEvent(evt);
  }