while (i < str5.length) { graphics2D.drawString(str5[i], initialPos, 115); i++; initialPos += 30; }