When i click the sendButton i get NullPointerException. And I'm kinda stuck there. The outputStream works in the ServerMessageThread, but not when clicking my button. I know that it can be fixed, but at the moment i can't figure it out.

The ChatServer works, because i've tested it without using a client interface, tested it in the console. For every client i'm creating a thread.

I just need an idea.Thank you. Best regards.

P.S: i know that it isn't a good practice to put much code in the question, but i wanted to show you how i implemented the client app.

I had given up up the default constructor and called the parameterized constructor directrly intro the main method( in the constroctor calling the createInterface method), like this:
public static void main(String...args){
try{