This code sample is a portion of a Client/Server chat application built in Java. This examples shows the GUI implementation, which was implemented using JavaFX. For a more detailed example of this implementation feel free to email me.
This application makes use of multi-threading and TCP sockets for message passing. It also makes use of the observer pattern, which is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods.