public void paintComponent(Graphics g)
{
    if(flag)//skips the method body when show() is executed
	{
	    super.paintComponent(g);//erases panel contents
	    g.setColor(Color.yellow);
	    if(!flag1 && !flag2)//not isSame nor isBlank
                {
		    writeEm(g);
                }
	    else if( flag1)
                {
		    g.drawString("The worlds are repeating!", 10, 250);
                }
	    else
                {
		    g.drawString("The world is blank!", 10, 250);
                }
	}
    else
	flag = true;
    //means that paintComponent() is executed whenever repaint() is executed
}


