title: How to add an array of objects to a JFrame or a JPanel in Netbeans?
body: <p>I am developing an ant simulator for my final year project.  Here is a design of my work:</p>
  
  <p><a href="https://i.stack.imgur.com/gYKdx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gYKdx.png" alt="enter image description here"></a></p>
  
  <p>The problem is since I can't find a way to add an array of objects into a JFrame or a JPanel, or arrange objects into an array.  Source code are protected by Netbeans so I can't even modify it manually.  Is there any way to add arrays of objects, or is there any other way to do the grid world?</p>