Dimension d = getSize();
int left = 10;
int bottom = d.height - 20;
int width = d.width-20;
int height = d.height - 50;
int die;
int max=0;
for( die = 0; die < results.length; die += 1 )
{ if( max < results[die] )
{ max = results[die];
}
}
int vertUnit = height/max;
int horizUnit = width/(5*dice+1);
for( die = 0; die < results.length; die += 1 )
{ g.drawRect( left+die*horizUnit,
bottom-results[die]*vertUnit,
horizUnit,
results[die]*vertUnit );
}