private void resizeArrays(){
  float[] temp_f;
  int[] temp_i;
  String[] temp_s;
  if (max < 5000) {
    max*=5;
  }
 else   if (max < 10000) {
    max*=2;
  }
 else {
    max+=1000;
  }
  temp_s=contents;
  contents=new String[max];
  System.arraycopy(temp_s,0,contents,0,pointer);
  temp_i=f_writingMode;
  f_writingMode=new int[max];
  f_writingMode=new int[max];
  System.arraycopy(temp_i,0,f_writingMode,0,pointer);
  temp_s=colorTag;
  colorTag=new String[max];
  System.arraycopy(temp_s,0,colorTag,0,pointer);
  temp_i=text_length;
  text_length=new int[max];
  System.arraycopy(temp_i,0,text_length,0,pointer);
  temp_f=f_character_spacing;
  f_character_spacing=new float[max];
  System.arraycopy(temp_f,0,f_character_spacing,0,pointer);
  temp_i=f_end_font_size;
  f_end_font_size=new int[max];
  System.arraycopy(temp_i,0,f_end_font_size,0,pointer);
  temp_f=space_width;
  space_width=new float[max];
  System.arraycopy(temp_f,0,space_width,0,pointer);
  temp_f=f_x1;
  f_x1=new float[max];
  System.arraycopy(temp_f,0,f_x1,0,pointer);
  temp_f=f_x2;
  f_x2=new float[max];
  System.arraycopy(temp_f,0,f_x2,0,pointer);
  temp_f=f_y1;
  f_y1=new float[max];
  System.arraycopy(temp_f,0,f_y1,0,pointer);
  temp_f=f_y2;
  f_y2=new float[max];
  System.arraycopy(temp_f,0,f_y2,0,pointer);
}

private void resizeArrays ( ) { float [ ] temp_f ; int [ ] temp_i ; String [ ] temp_s ; if ( max < 5000 ) { max *= 5 ; } else if ( max < 10000 ) { max *= 2 ; } else { max += 1000 ; } temp_s = contents ; contents = new String [ max ] ; System . arraycopy ( temp_s , 0 , contents , 0 , pointer ) ; temp_i = f_writingMode ; f_writingMode = new int [ max ] ; f_writingMode = new int [ max ] ; System . arraycopy ( temp_i , 0 , f_writingMode , 0 , pointer ) ; temp_s = colorTag ; colorTag = new String [ max ] ; System . arraycopy ( temp_s , 0 , colorTag , 0 , pointer ) ; temp_i = text_length ; text_length = new int [ max ] ; System . arraycopy ( temp_i , 0 , text_length , 0 , pointer ) ; temp_f = f_character_spacing ; f_character_spacing = new float [ max ] ; System . arraycopy ( temp_f , 0 , f_character_spacing , 0 , pointer ) ; temp_i = f_end_font_size ; f_end_font_size = new int [ max ] ; System . arraycopy ( temp_i , 0 , f_end_font_size , 0 , pointer ) ; temp_f = space_width ; space_width = new float [ max ] ; System . arraycopy ( temp_f , 0 , space_width , 0 , pointer ) ; temp_f = f_x1 ; f_x1 = new float [ max ] ; System . arraycopy ( temp_f , 0 , f_x1 , 0 , pointer ) ; temp_f = f_x2 ; f_x2 = new float [ max ] ; System . arraycopy ( temp_f , 0 , f_x2 , 0 , pointer ) ; temp_f = f_y1 ; f_y1 = new float [ max ] ; System . arraycopy ( temp_f , 0 , f_y1 , 0 , pointer ) ; temp_f = f_y2 ; f_y2 = new float [ max ] ; System . arraycopy ( temp_f , 0 , f_y2 , 0 , pointer ) ; }
resize arrays to add newitems to end ( - 1 makes it grow )
