title: A Grid of Panels that are made of buttons
body: <pre><code>import javax.swing.*;
  import java.awt.*;
  import java.awt.event.*;
  
  public class Game extends JFrame implements ActionListener {
  
  private JPanel panel;
  private JButton[] button;
  private int count = 0;
  private int sign = 0;
  
  
  public Game(){
      panel = new JPanel();
      panel.setLayout(new GridLayout(3,3));
      add(panel);
      button = new JButton[9];
      for (int i = 0; i &lt; 9; i++){
          button[i] = new JButton();
          button[i].setPreferredSize(new Dimension(100,100));
          panel.add(button[i]);
          button[i].setEnabled(true);
          button[i].addActionListener(this);
          button[i].setFont(new Font("Arial", Font.PLAIN, 30));
      }
  
      pack();
      setVisible(true);
  }
  
  
  public void actionPerformed(ActionEvent e){
      count ++;
      int i = 0;
      for(i = 0; i &lt; 9; i++){
          if(button[i] == e.getSource()){
              if(sign % 2 == 0){
                  button[i].setText("X");
                  button[i].setEnabled(false);
              }
              else {
                  button[i].setText("O");
                  button[i].setEnabled(false);
              }
              break;
          }
      }
  
      if(isAWinner(i) &amp;&amp; count &gt; 2){
  
          JOptionPane.showMessageDialog(null, "" + button[i].getText() + "s Win");
          for(int j = 0; j &lt; 9; j++){
              button[j].setText("");
              button[j].setEnabled(true);
          }
          count = 0;
          sign = 0;
          return;
      }
  
  
  
      if(count &gt;= 9){
          JOptionPane.showMessageDialog(null, "Cat's Game!");  
          for(int j = 0; j &lt; 9; j++){  
              button[j].setText("");  
              button[j].setEnabled(true);  
          }  
          count = 0;  
          sign = 0;  
          return;  
      }  
  
      sign++;  
  
  }  
  </code></pre>
  
  <p>So this works fine the game of tic tac toe itself has no issues
  My issue is when I try to make a grid of these games</p>
  
  <pre><code>import java.awt.Container;
  import java.awt.GridLayout;
  
  import javax.swing.JFrame;
  
  public class TicTacTest{
  
  public static void main(String[] args) {
  
      JFrame frame = new JFrame();
      frame.setTitle("Super TicTacToe");
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setSize(900,900);
      Container pane = frame.getContentPane();
      pane.setLayout(new GridLayout(3,3));
  
          Game[] games = new Game[9];
  
          for(int i = 0; i &lt; 9; i++){
  
              games[i] = new Game();
              pane.add(games[i]);
          }
  
  
          frame.setVisible(true);
  
      }
  
  }
  </code></pre>
  
  <p>I thought that would work but apparently I'm wrong because nothing shows up. </p>
  
  <p>What should I have in my main to make 9 Tic Tac Toe boards?</p>