How to change screen states in java?

I am trying to change the state of the screen from Menu to PlayState by pressing space, but when space is pressed the program seems to be in some loop as it keeps on drawing things in the playstate.
Here is the code:

public class Main {

    public enum ScreenState {MENU, PLAYSTATE, RESET}

    static ScreenState screenState = ScreenState.MENU;

    static Menu menu = new Menu();


    public static void main(String[] args) {



//        Setting default canvas
        StdDraw.clear();
        StdDraw.setCanvasSize(800, 700);
        StdDraw.setXscale(0, 800);
        StdDraw.setYscale(0, 700);
        StdDraw.filledRectangle(0,0,800,700);

        while(true) {

          switch (screenState) {
            case MENU:
              menu.drawMenu();
              //        starts game
              if (StdDraw.isKeyPressed(' ')) {
               screenState = ScreenState.PLAYSTATE;
              }

              break;

            case PLAYSTATE:

              StdDraw.setPenColor(StdDraw.BLACK);
              StdDraw.filledRectangle(0,0,800,700);
              StdDraw.setPenColor(StdDraw.WHITE);
              StdDraw.text(50,680,"SCORE");

              break;  
          }
        }
    }
}