Spend some more time looking at layout managers. Adding to Time4Java's advice, you may want to use a BorderLayout in the main container, use a GridLayout in a JPanel to which the box[][] elements...