I write client server application (chat). The client sends a message -> the server accepts it and sends it to all other clients. Initially, I just made the Label update with messages (via Task) and everything worked fine. Now we need another 1 Label to display the list of connected clients, the server sends a string with information in the following form: "/тип/сообщение" for example "/m/hello!" this is a hello message. "/n/User" means that a new user has been connected with User. How to make that when receiving a string from the server, the client updates a specific Label depending on the type of message?
|
Platform.runLater- Mikhail Vaysman