I am asked to make a program called connect four, the problem is that I want to make the program works if I erase

protected void paintComponent(Graphics g)
StringTokenizer st = new StringTokenizer(myGame.toString(), "\n");
//st.nextToken(); <<<--- delete this line
int i = 0;
while (st.hasMoreTokens())

in the GUI test program, but what can I do instead of modifying my GUI test program, which part of my class program that I made must I change in order to get the same output as modifying the GUI??? Please I need help

The GUI:
The class: