i have a client server application, where a player can select a board game like chess and play it. Therefore i have one JFrame for the menu, where the player can click a button for playing chess. If the player does so, the runChess() method gets called. in runChess() i setup the second frame for the board and i have a while(true) loop, for as long as the game is going on, i communicate with the sever, to update my GUI, check if its a valid move, etc.
the problem is, that my second frame does not load properly. it shows just a grey frame but does not load the board. if i break the while loop and runChess() terminates, then my frame is shown correctly.
Does anyone know how i can solve this problem showing my second frame correctly within the while loop?