public int recurseInteractionFrames(Graphics2D g2,Vector<Integer> interactionframes,HashMap<String,String> interactionframesText,int pos,int recursionLevel){
  int pos1=interactionframes.elementAt(pos);
  int posX;
  while (pos < interactionframes.size() && (posX=interactionframes.elementAt(pos)) > 0) {
    pos1=posX;
    pos++;
    pos=recurseInteractionFrames(g2,interactionframes,interactionframesText,pos,recursionLevel + 1);
    if (pos1 <= 0) {
      return pos;
    }
    int pos2=interactionframes.elementAt(pos) * -1;
    drawInteractionFrame(g2,pos1,pos2,recursionLevel,interactionframesText.get("" + pos1));
    pos++;
  }
  return pos;
}

public int recurseInteractionFrames ( Graphics2D g2 , Vector < Integer > interactionframes , HashMap < String , String > interactionframesText , int pos , int recursionLevel ) { int pos1 = interactionframes . elementAt ( pos ) ; int posX ; while ( pos < interactionframes . size ( ) && ( posX = interactionframes . elementAt ( pos ) ) > 0 ) { pos1 = posX ; pos ++ ; pos = recurseInteractionFrames ( g2 , interactionframes , interactionframesText , pos , recursionLevel + 1 ) ; if ( pos1 <= 0 ) { return pos ; } int pos2 = interactionframes . elementAt ( pos ) * - 1 ; drawInteractionFrame ( g2 , pos1 , pos2 , recursionLevel , interactionframesText . get ( "" + pos1 ) ) ; pos ++ ; } return pos ; }
recusion level step of interactionframes ie : iframe { iframe { } iframe { } }
