private void createNewRoom() {
        
        String name = mainPanel.getNewChatRoomName();
        if(name == null) {
            return;
        }
        if(name.isEmpty()) {
            return;
        }
        
        try {
            ChatRoom room = session.create(name);
            mainPanel.addChatRoom(room);
        } catch(RemoteException e) {
            fatalErrorExit("Fatal error", e);
        } catch(ChatRoomInvalidStateException e) {
            fatalErrorExit("Fatal error", e);
        } catch(ChatRoomAlreadyExistsException e) {
            warning("Room already exist.");
        }
    }