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

[ad_1]

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.

[ad_2]

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