private void judgeRoom ()
    {
        boolean jump = false;
        for ( int i = client.chatRooms.size() - 1; i >= 0; i-- )
        {
            if ( client.chatRooms.get(i).equals(roomId.getText()) ) // check name
            {
                jump = true;
            }
        }
        if (jump == true)
        {
            JOptionPane.showMessageDialog(null, "房間名稱重複", "Error",  
                    JOptionPane.ERROR_MESSAGE); 
        }
        else
        {
            client.chatRooms.add(roomId.getText());
            this.dispose();
        }
    }