public void mouseDoubleClicked(Point p){
    //update current index
    curr=mygraph.findIndex(p);
    //pop up the curr location's property 
    if(curr!=-1){ 
      JOptionPane mypane=new JOptionPane();
      String display="Name:"+getCurrName()+"\n(x,y)=("
        +getCurrPoint().getX()+","+getCurrPoint().getY()+")\nID="+getCurrID()
        +"\nNew location name:";
      String s = mypane.showInputDialog(display);
      if(s==null){
        return;
      }
      while(s.length()==0){
        display="Invalid new Name!\nName:"+getCurrName()+"\n(x,y)=("
          +getCurrPoint().getX()+","+getCurrPoint().getY()+")\nID="+getCurrID()
          +"\nNew location name:";
        s = mypane.showInputDialog(display);
        if(s==null){
          return;
        }
      }
      setCurrName(s);
    } 
  }