Q:

Drawing buttons outside of the method they were made in?

Basically, I drew and have all my code in the main method. I'm trying to make a start menu so I want to be able to have a method (named drawMenu), that I can run to draw out the tic-tac-toe buttons. 
Shorter explanation, how do I draw buttons outside of this main method in this drawMenu method?
package myClass;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.util.HashMap;
import java.util.Map;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.tools.ToolProvider;

public class mainClass {

    //Boolean switcher for playing/not

    //Create panel sides for action listeners
    enum ESide {
              tleft, tmid, tright,
              mleft, mmid, mright,
              bleft, bmid, bright,
            };

public static void main(String[] args) {

    //Objects

    //create window
    JFrame mainWindow = new JFrame("Tic Tac Toe");
    //properties of mainWindow
    mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    mainWindow.setSize(600, 600); // buttons will fill entirely, 200x200      buttons
    mainWindow.setLayout(new GridLayout(3, 3));

    //create buttons
    JButton startButton = new JButton("Start");
    JButton topLeft = new JButton("");
    JButton topMid = new JButton("");
    JButton topRight = new JButton("");
    JButton midLeft = new JButton("");
    JButton midMid = new JButton("");
    JButton midRight = new JButton("");
    JButton botLeft = new JButton("");
    JButton botMid = new JButton("");
    JButton botRight = new JButton("");

    //Definitions
    final Map<ESide, Boolean> board = new HashMap<>();
    for (ESide side : ESide.values()) {
        board.put(side, false);
    }
    //Dimensions
    Dimension selectionButtonSize = new Dimension(100,25);
    Dimension buttonSize = new Dimension(200,200);

    //Action listener

topLeft.addMouseListener(new java.awt.event.MouseAdapter() {
      public void mouseClicked(java.awt.event.MouseEvent evt)
        {
            if (board.get(ESide.tleft).booleanValue() == false) {
                topLeft.setText("X");
                board.put(ESide.tleft, true);
            }
        }

  });

topMid.addMouseListener(new java.awt.event.MouseAdapter() {
      public void mouseClicked(java.awt.event.MouseEvent evt)
        {
            if (board.get(ESide.tmid).booleanValue() == false) {
                topMid.setText("X");
                board.put(ESide.tmid, true);
            }
        }

  });

topRight.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt)
              {
                  if (board.get(ESide.tright).booleanValue() == false) {
                      topRight.setText("X");
                      board.put(ESide.tright, true);
                  }
              }

  });

midLeft.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt)
              {
                  if (board.get(ESide.mleft).booleanValue() == false) {
                      midLeft.setText("X");
                      board.put(ESide.mleft, true);
                  }
              }

  });

midMid.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt)
              {
                  if (board.get(ESide.mmid).booleanValue() == false) {
                      midMid.setText("X");
                      board.put(ESide.mmid, true);
                  }
              }

  });

midRight.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt)
              {
                  if (board.get(ESide.mright).booleanValue() == false) {
                      midRight.setText("X");
                      board.put(ESide.mright, true);
                  }
              }

  });

botLeft.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt)
              {
                  if (board.get(ESide.bleft).booleanValue() == false) {
                      botLeft.setText("X");
                      board.put(ESide.bleft, true);
                  }
              }

  });

botMid.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt)
              {
                  if (board.get(ESide.bmid).booleanValue() == false) {
                      botMid.setText("X");
                      board.put(ESide.bmid, true);
                  }
              }

  });

botRight.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt)
              {
                  if (board.get(ESide.bright).booleanValue() == false) {
                      botRight.setText("X");
                      board.put(ESide.bright, true);
                  }
              }

  });

drawMenu();
mainWindow.setVisible(true); // draw it

}

public static void drawMenu() {
    System.out.println("Drawing menu button");
    //I want to be able to access the buttons to draw them here.

}

}

A:

Suggestion: get everything out of main method that you currently have in it.
Instead create an OOP compliant class that has non-static instance JButton fields as well as any other fields that you need, create the GUI in this class's constructor, and use the main method to simply create an instance of this class, place it into a JFrame (if it's a JPanel, which it should be), and then set it visible. The key concept here being to use object-oriented techniques since Java is first and foremost an object-oriented programming language, and by doing so, you will reduce current and especially future complexity.
For instance,
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import javax.swing.*;

@SuppressWarnings("serial")
public class SimpleTicTacToe extends JPanel {
    private static final int SIDE = 3;
    private static final float BTN_FONT_SIZE = 64f;
    public static final Color X_COLOR = Color.RED;
    public static final Color O_COLOR = Color.BLUE;
    private boolean xTurn = true;
    private JButton[][] buttonGrid = new JButton[SIDE][SIDE];

    public SimpleTicTacToe() {
        JPanel btnPanel = new JPanel(new GridLayout(SIDE, SIDE));
        for (int i = 0; i < buttonGrid.length; i++) {
            for (int j = 0; j < buttonGrid[i].length; j++) {
                buttonGrid[i][j] = new JButton(new TicTacToeBtnAction());
                buttonGrid[i][j].setFont(buttonGrid[i][j].getFont().deriveFont(Font.BOLD, BTN_FONT_SIZE));
                btnPanel.add(buttonGrid[i][j]);
            }
        }

        JPanel bottomPanel = new JPanel();
        bottomPanel.add(new JButton(new ResetAction("Reset", KeyEvent.VK_R)));

        setLayout(new BorderLayout());
        add(btnPanel, BorderLayout.CENTER);
        add(bottomPanel, BorderLayout.PAGE_END);
    }

    class TicTacToeBtnAction extends AbstractAction {
        public TicTacToeBtnAction() {
            super("   ");
        }

        @Override
        public void actionPerformed(ActionEvent e) {
            JButton btn = (JButton) e.getSource();
            String btnText = btn.getText().trim();
            if (!btnText.isEmpty()) {
                return;
            }
            if (xTurn) {
                btn.setForeground(X_COLOR);
                btn.setText("X");
            } else {
                btn.setForeground(O_COLOR);
                btn.setText("O");
            }
            xTurn = !xTurn;
        }
    }

    private class ResetAction extends AbstractAction {
        public ResetAction(String name, int mnemonic) {
            super(name);
            putValue(MNEMONIC_KEY, mnemonic);
        }

        @Override
        public void actionPerformed(ActionEvent e) {
            for (JButton[] jButtons : buttonGrid) {
                for (JButton jButton : jButtons) {
                    jButton.setText("");
                }
            }
            xTurn = true;
        }
    }

    private static void createAndShowGui() {
        SimpleTicTacToe mainPanel = new SimpleTicTacToe();

        JFrame frame = new JFrame("Tic Tac Toe");
        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        frame.getContentPane().add(mainPanel);
        frame.pack();
        frame.setLocationByPlatform(true);
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            createAndShowGui();
        });
    }
}

And yes, as FredK suggests -- be sure to start all Swing apps on the Swing event thread (as demonstrated above).

