String size = JOptionPane.showInputDialog("How big would you like your grid? ");
for (double x=300-((Integer.parseInt(size)/2)*30);x<300+((Integer.parseInt(size)/2)*30);x=x+30)
{
for (int y=10;y<y+Integer.parseInt(size)*30;y=y+30)
{
addObject(new Square(), (int)x, (int)y);
}
}
