Might I suggest the following?
While you are learning Java, try to lign up your code logically, like the following example:
Notice how the brackets line up? In your code, you have brackets that EXCLUDE portions of the code "add(box)" from the body of the method they belong to. When you align the brackets, things start to look a lot better all of a sudden and it's easy to spot the problem areas.
Formatting code properly is going to help you a lot, especially as your programs grow in size and complexity.
I hope this helps.