This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
One way to do this is to have a class with an instance variable called "buttons" (which references an array of JButtons) and an instance method called "makeButtons" (which takes an int value, instantiates the array to that size, and fills it with new JButton references).
So where would you put an instance variable and an instance method?