Im not printing out the array. The purpose of this program is creating an array of objects. the result of this program should be a box filled with green color.
Then you need to show that somehow. So, your question is no longer how to create a 2d array, but rather how to display it? If so, take a look at GridLayout and JPanel and setBackground, or Canvas.