@SuppressWarnings({ "rawtypes", "unchecked" })
	public Room(RealClient p_client, Object[] p_data, String p_name, int p_width, boolean p_in)
	{
		this.client = p_client;
		this.width = p_width;
		this.name = p_name;
		this.setLayout(new BorderLayout(0, 0));
		menuBar = new JMenuBar();
		this.add(menuBar, BorderLayout.NORTH);

		final JLabel lblRoom = new JLabel(p_name);
		menuBar.add(lblRoom);

		sep = new JSeparator();

		menuBar.add(sep);

		btnMoveaction = new JButton();
		btnMoveaction.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent arg0)
			{
				if (btnMoveaction.getText().equals("Enter"))  //This just calls commands the intelligence is in the server, he knows his "papenheimer" clients best.
				{
					client.enterRoom(name,null);
				} else
				{
					client.leaveRoom();
				}
			}
		});

		if (p_in)// // If you are in the room you only can leave.
		{
			setEntered();
		} else
		// // If you are not in the room you only can enter.
		{
			setLeaved();
		}
		menuBar.add(btnMoveaction);

		listModel = new DefaultListModel();
		if(p_data != null)
		{
			for (Object o : p_data)
			{
				listModel.addElement(o);
			}
		}
		list = new JList<Object>(listModel);
		list.addListSelectionListener(new ListSelectionListener()
		{
			public void valueChanged(ListSelectionEvent arg0)
			{
				setSelected((String) list.getSelectedValue());
			}
		});

		// // Makes List deselect when a clicked element is clicked again
		list.setSelectionModel(new DefaultListSelectionModel()
		{

			private static final long serialVersionUID = -6629633884200508451L;

			@Override
			public void setSelectionInterval(int index0, int index1)
			{
				if (index0 == index1)
				{
					if (isSelectedIndex(index0))
					{
						removeSelectionInterval(index0, index0);
						return;
					}
				}
				super.setSelectionInterval(index0, index1);
			}

			@Override
			public void addSelectionInterval(int index0, int index1)
			{
				if (index0 == index1)
				{
					if (isSelectedIndex(index0))
					{
						removeSelectionInterval(index0, index0);
						return;
					}
					super.addSelectionInterval(index0, index1);
				}
			}

		});
		// // Makes List deselect when a clicked element is clicked again
		this.add(list);
		this.setPreferredSize(new Dimension(p_width, list.getPreferredSize().height + menuBar.getPreferredSize().height));
	}