@Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g); // redraw paint method. so it doesnt draw on
        // top of each other

        mainMenuObj.menuMessage(mx, g);

        if (currentMode.equals(mode1)) { // MainMenu
            mainMenuObj.paint(g, hoverLeft);
        } else if (currentMode.equals(mode2)) { // tictactoe sub menu
            ticTacToeSubMenuObj.paint(g);
        } else if (currentMode.equals(mode3) || currentMode.equals(mode4)) { // tictactoe
            // player
            // 1
            ticTacToeboardObj.paint(g, ticTacToePlayerObj);

            if (squareStore != null) {
                ticTacToeFunctionsObj.paintCharacters(g, squareStore);
            }
        } else if (currentMode.equals(mode5)) {
            goSettingObj.paint(g);
        } else if (currentMode.equals(mode6)) { // go board
            goBoardObj.paint(g);

            if (goSquareStore != null) {
                goFunctionsObj.paintCharacters(g, goSquareStore);
            }
        }
        repaint();
    }