Thank you all for your help. I have researched a few days and I have found a javascript code that does what i want. I need to convert this from js to java for processing. What would be the equivalent in Processing? Thanks so much - I have already learned a great deal.
var i, j;
for(i=1;i<=5;i++){
for(j=1;j<=i;j++){
document.write("*");
}
document.write('<br/>');
}