[Solved] Why isn’t the text in the JLabel in my application updated accordingly when I press the button?


Move the while(true) loop checking for any new messages into a thread, as opposed to the action within the button which initiates the server. This will stop the frame from being updated to to unreachable code.

solved Why isn’t the text in the JLabel in my application updated accordingly when I press the button?