title: How can I make an array of Circles appear in my GUI
body: <p>I've created an array of white circles. I've created them in array format because I'll be using them to create a connect4 game later on. (I'm new to Java. This is my only idea.) I'm trying to add it to my panel, but it won't show up. There are no error messages in creating the array, so I'm assuming that I'm not adding it to the panel correctly. But I'm not quite sure what the problem is. Any help would be appreciated.</p>
  
  <pre><code>public class Main {
      private static final int ROWS = 6;
      private static final int COLS = 7;
      private static final int DISC_SIZE = 60;
  public static void main(String[] args) {
      // Creating instance of JFrame
      JFrame frame = new JFrame("Connect 4");
      // Setting the width and height of frame
      frame.setSize(700, 600);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
      JPanel panel = new JPanel();
      frame.add(panel);
      panel.setBackground(java.awt.Color.BLUE);
      addComponents(panel);
  
      frame.setVisible(true);
  
  }//close main
  
  private static void addComponents(JPanel panel) {
  
  
      panel.setLayout(null);
      JLabel gameTitle = new JLabel("Connect 4");
      gameTitle.setBounds(310,20,80,25);
      panel.add(gameTitle);
  
      Circle[][] gameBoard = createBoard();
  
      JButton col0Button = new JButton("Column 1");
      col0Button.setBounds(20, 400, 100, 25);
      panel.add(col0Button);
  
      JButton col1Button = new JButton("Column 2");
      col1Button.setBounds(110, 400, 100, 25);
      panel.add(col1Button);
  
      JButton col2Button = new JButton("Column 3");
      col2Button.setBounds(200, 400, 100, 25);
      panel.add(col2Button);
  
      JButton col3Button = new JButton("Column 4");
      col3Button.setBounds(290, 400, 100, 25);
      panel.add(col3Button);
  
      JButton col4Button = new JButton("Column 5");
      col4Button.setBounds(380, 400, 100, 25);
      panel.add(col4Button);
  
      JButton col5Button = new JButton("Column 6");
      col5Button.setBounds(470, 400, 100, 25);
      panel.add(col5Button);
  
      JButton col6Button = new JButton("Column 7");
      col6Button.setBounds(560, 400, 100, 25);
      panel.add(col6Button);
  
  
  }//close addComponents method
  
  private static Circle[][] createBoard(){
      Circle[][] disc = new Circle[ROWS][COLS];
      for (int loop = 0; loop &lt; disc.length; loop++) {
          for (int innerLoop = 0; innerLoop &lt; disc[loop].length; innerLoop++) {
              disc[loop][innerLoop] = makeCircle();
  
          }//close inner for
      }//close for
      return disc;
  }//close method
  
  private static Circle makeCircle(){
      Circle circle = new Circle();
      circle.setFill(Color.WHITE);
      circle.setRadius(30.0f);
      return circle;
  }
  
  }//close Main class
  </code></pre>