Menu - Item Order

Hi!
How do I have to do it that Items are drawn like this:

Potion x99 Aether x99
MegaPotion x99 Phoenix x99

So that it change Y Coords after the second Item.

I only know this:


 for(int x=0;x<ItemList.size();x++)
             g.drawString(ItemList.get(x).name, 20*(x+1), 30);

but what now for the Y? How are you doing it?

drawX = x % 2 * width;
drawY = x / 2 * height;

drawX and drawY being second and third parameters to drawString and width and height being width and height of strings.