Creating a new window to keep the chat opened

Testing a way to keep the chat opened. JOptionPane didnt work.