private void initComponents() {
		teamPanel = new JPanel();
		publicPanel = new JPanel();
		chatPanel = new JPanel();
		actionPanel = new JPanel();
		//publicPanel.setBackground(new Color(204, 204, 255));
		nameJlbl = new JLabel("Member: " + userLogin.getName());
		nameJlbl.setFont(new Font("Tahoma", 1, 18));
		
		// Team Panel components
		teamListPanel = new JPanel();
		availableMaterialPanel = new JPanel();
		teamListPanel.setBorder((BorderFactory.createLineBorder(Color.BLACK, 1)));
		teamJlbl = new JLabel("Team", JLabel.CENTER);
		teamJlbl.setFont(new Font("Tahoma", 1, 16));
		teamJlbl.setForeground(new Color(255, 255, 255));
		teamJlbl.setOpaque(true);
		teamJlbl.setBackground(new Color(51, 51, 51));
		teamLeaderJlbl = new JLabel("Team Leader", JLabel.CENTER);
		teamLeaderJlbl.setFont(new Font("Tahoma", 1, 16));
		teamLeaderJlbl.setOpaque(true);
		teamLeaderJlbl.setBackground(new Color(221, 221, 221));
		teamLeaderJlbl.setFont(new Font("Tahoma", 1, 16));
		teamLeaderJlbl.setForeground(Color.BLACK);
		teamRepJlbl = new JLabel("Team Rep.", JLabel.CENTER);
		teamRepJlbl.setOpaque(true);
		teamRepJlbl.setBackground(new Color(221, 221, 221));
		teamRepJlbl.setFont(new Font("Tahoma", 1, 16));
		teamRepJlbl.setForeground(Color.BLACK);
		teamMebJlbl = new JLabel("Members", JLabel.CENTER);
		teamMebJlbl.setFont(new Font("Tahoma", 1, 16));
		teamMebJlbl.setOpaque(true);
		teamMebJlbl.setBackground(new Color(221, 221, 221));
		teamMebJlbl.setForeground(Color.BLACK);
		availableMaterialJlbl = new JLabel("Available Materials", JLabel.CENTER);
		availableMaterialJlbl.setFont(new Font("Tahoma", 1, 16));
		availableMaterialJlbl.setOpaque(true);
		availableMaterialJlbl.setBackground(Color.BLACK);
		availableMaterialJlbl.setForeground(Color.WHITE);
		
		teamLeaderDLM = new DefaultListModel();
		teamLeaderJlst = new JList(teamLeaderDLM);
		teamLeaderJscl = new JScrollPane(teamLeaderJlst);
		teamLeaderJscl.setBorder(BorderFactory.createEmptyBorder());
		teamRepDLM = new DefaultListModel();
		teamRepJlst = new JList(teamRepDLM);
		teamRepJscl = new JScrollPane(teamRepJlst);
		teamRepJscl.setBorder(BorderFactory.createEmptyBorder());
		teamMebDLM = new DefaultListModel();
		teamMebJlst = new JList(teamMebDLM);
		teamMebJscl = new JScrollPane(teamMebJlst);
		teamMebJscl.setBorder(BorderFactory.createEmptyBorder());
		availableMaterialDLM = new DefaultListModel();
		availableMaterialJlst = new JList(availableMaterialDLM);
		availableMaterialJscl = new JScrollPane(availableMaterialJlst);
		turnLeftJlbl = new JLabel("Turn left: 20", JLabel.CENTER);
		turnLeftJlbl.setFont(new Font("Tahoma", 1, 16));
		timeLeftJlbl = new JLabel("Time left: 04:23", JLabel.CENTER);
		timeLeftJlbl.setFont(new Font("Tahoma", 1, 16));
		setTeamRepJbtn = new JButton("Set Team Rep");
		setTeamRepJbtn.setBackground(new Color(221, 221, 221));
		downloadJbtn = new JButton("Download");
		downloadJbtn.setBackground(new Color(221, 221, 221));
		downloadJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				downloadMaterials();
			}
			
		});
		setTeamRepJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				initSRTCompoenent();
				setTeamRep();
				
			}
			
		});
		

		
		// Chat Panel components
		chatJlbl = new JLabel("Chat");
		chatJlbl.setFont(new Font("Tahoma", 1, 16));
		chatHistoryDLM = new DefaultListModel();
		chatHistoryJlst = new JList(chatHistoryDLM);
		chatHistoryJlst.setCellRenderer(new MyCellRenderer(170));
		chatHistoryJscl = new JScrollPane(chatHistoryJlst);
		chatInputJTxa = new JTextArea();
		chatInputJTxa.setLineWrap(true);
		chatInputJTxa.setBorder((BorderFactory.createLineBorder(Color.GRAY, 1)));
		/*JTe
		chatInputJTxa.addKeyListener(new KetListener() {
			
		});*/
		sendChatJbtn = new JButton("Send");
		sendChatJbtn.setBackground(new Color(221, 221, 221));
		sendChatJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				
				addNewChat();
			}
			
		});
		acceptPositionJbtn = new JButton("Accept Position");
		acceptPositionJbtn.setBackground(new Color(221, 221, 221));
		acceptPositionJbtn.setEnabled(false);
		acceptPositionJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				acceptPosition();
				
			}
			
		});
		handoverTurnJbtn = new JButton("Handover Turn");
		handoverTurnJbtn.setBackground(new Color(221, 221, 221));
		handoverTurnJbtn.setEnabled(false);
		handoverTurnJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				handOverTurn();
				
			}
			
		});
		logoutJbtn = new JButton("Log out");
		logoutJbtn.setBackground(new Color(221, 221, 221));
		logoutJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				logout();
			}
			
		});
		exitDebateJbtn = new JButton("Exit Debate");
		exitDebateJbtn.setBackground(new Color(221, 221, 221));
		exitDebateJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				exitDebate();
			}
			
		});
		
		// Action Panel compoenents
		actionsListPanel = new JPanel();
		resultsPanel = new JPanel();
		descriptionPanel = new JPanel();
		resultsPanel.setBackground(Color.gray);
		addNewJbtn = new JButton("Add New");
		addNewJbtn.setBackground(new Color(221, 221, 221));
		addNewJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				// New Action JFrame initialization
				newActionJFrameInit();
				
			}
			
		});
		withdrawJbtn = new JButton("Withdraw");
		withdrawJbtn.setBackground(new Color(221, 221, 221));
	//	withdrawJbtn.setEnabled(false);
		withdrawJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				withdrawActionFromPublic();
			}
			
		});
		submitJbtn = new JButton("Submit");
		submitJbtn.setBackground(new Color(221, 221, 221));
		submitJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				submitActionToPublic();
				
			}
			
		});
		editDetailsJbtn = new JButton("Edit Details");
		editDetailsJbtn.setBackground(new Color(221, 221, 221));
		editDetailsJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				// Edit Details JFrame initialization
				editDetailsJFrameInit();
			}
			
		});
		deleteActionJbtn = new JButton("Delete Action");
		deleteActionJbtn.setBackground(new Color(221, 221, 221));
		deleteActionJbtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				deleteAction();
				
			}
			
		});
		
		actionsJlbl = new JLabel("Actions", JLabel.CENTER);
		actionsJlbl.setFont(new Font("Tahoma", 1, 16));
		actionsJlbl.setForeground(new Color(255, 255, 255));
		actionsJlbl.setOpaque(true);
		actionsJlbl.setBackground(new Color(51, 51, 51));
		resultsJlbl = new JLabel("Results Title", JLabel.CENTER);
		resultsJlbl.setFont(new Font("Tahoma", 1, 16));
		resultsJlbl.setForeground(new Color(255, 255, 255));
		resultsJlbl.setOpaque(true);
		resultsJlbl.setBackground(new Color(51, 51, 51));
		decriptionJlbl = new JLabel("Description:");
		decriptionJlbl.setFont(new Font("Tahoma", 1, 16));
		parentJlbl = new JLabel("Parent:");
		parentJlbl.setFont(new Font("Tahoma", 1, 16));
		dialogJlbl = new JLabel("Dialog:");
		dialogJlbl.setFont(new Font("Tahoma", 1, 16));
		playerJlbl = new JLabel("Player:");
		playerJlbl.setFont(new Font("Tahoma", 1, 16));
		parentContentJlbl = new JLabel("Parent:");
		parentContentJlbl.setFont(new Font("Tahoma", 1, 12));
		parentIdJlbl = new JLabel();
		parentIdJlbl.setVisible(false);
		dialogContentJlbl = new JLabel("Dialog:");
		dialogContentJlbl.setFont(new Font("Tahoma", 1, 12));
		playerContentJlbl = new JLabel("Player:");
		playerContentJlbl.setFont(new Font("Tahoma", 1, 12));
		descriptionJtxa = new JTextArea();
		descriptionJtxa.setEditable(false);
		
		actionsListDLM = new DefaultListModel();
		actionsListJlst = new JList(actionsListDLM);
		actionsListJscl = new JScrollPane(actionsListJlst);
		for (int i = 0; i < actionsList.length; i++) {
			actionsListDLM.addElement(actionsList[i]);
		}
		actionsListJlst.setSelectedIndex(0);
		// Action double-click listener
		actionsListJlst.addMouseListener(new MouseAdapter() {
			public void mouseClicked(MouseEvent mouseEvent) {
				JList theList = (JList) mouseEvent.getSource();
				if (mouseEvent.getClickCount() == 1) {
					int index = theList.locationToIndex(mouseEvent.getPoint());
					if (index >= 0) {
						Object o = theList.getModel().getElementAt(index);
						System.out.println("double-clicked on: " + o.toString() );
						getActionsResults(o.toString());
					}
				}
			}
		});
		titleDLM = new DefaultListModel();
		titleJlst = new JList(titleDLM);
		titleJscl = new JScrollPane(titleJlst);
		titleJlst.addMouseListener(new MouseAdapter() {
			public void mouseClicked(MouseEvent mouseEvent) {
				JList theList = (JList) mouseEvent.getSource();
				String title = null;
				if (mouseEvent.getClickCount() == 1) {
					int index = theList.locationToIndex(mouseEvent.getPoint());
					if (index >= 0) {
						Object o = theList.getModel().getElementAt(index);
						title = o.toString();
					}
				}
				Object typeObject = actionsListJlst.getSelectedValue();
				String type = null;
				if (typeObject != null) {
					type = typeObject.toString();
				}
				
				switch (type) {
				case CASECLAIM:
					if (currentClaim.getUserId().equals(userLogin.getName())
							&&  currentClaim.getDialogType().equals(ACTIONPRIVATE)) {
						editDetailsJbtn.setEnabled(true);
						deleteActionJbtn.setEnabled(true);
					} else {
						editDetailsJbtn.setEnabled(false);
						deleteActionJbtn.setEnabled(false);
					}
					getClaimDetail(title);
					break;
				case CASESUBCLAIM:
					if (currentClaim.getUserId().equals(userLogin.getName())
							&&  currentClaim.getDialogType().equals(ACTIONPRIVATE)) {
						editDetailsJbtn.setEnabled(true);
						deleteActionJbtn.setEnabled(true);
					} else {
						editDetailsJbtn.setEnabled(false);
						deleteActionJbtn.setEnabled(false);
					}
					getSubClaimDetail(title);
					break;
				case CASEEVIDENCE:
					if (evidenceCurrent.getUserId().equals(userLogin.getName())
							&&  evidenceCurrent.getDialogType().equals(ACTIONPRIVATE)) {
						editDetailsJbtn.setEnabled(true);
						deleteActionJbtn.setEnabled(true);
					} else {
						editDetailsJbtn.setEnabled(false);
						deleteActionJbtn.setEnabled(false);
					}
					getEvidenceDetail(title);
					break;
				case CASECOUNTERCLAIM:
					if (currentClaim.getUserId().equals(userLogin.getName())
							&& currentClaim.getDialogType().equals(ACTIONPRIVATE)) {
						editDetailsJbtn.setEnabled(true);
						deleteActionJbtn.setEnabled(true);
					} else {
						editDetailsJbtn.setEnabled(false);
						deleteActionJbtn.setEnabled(false);
					}
					getCounterClaimDetail(title);
					break;
				case "Counter Evidence":
					if (evidenceCurrent.getUserId().equals(userLogin.getName())
							&&  evidenceCurrent.getDialogType().equals(ACTIONPRIVATE)) {
						editDetailsJbtn.setEnabled(true);
						deleteActionJbtn.setEnabled(true);
					} else {
						editDetailsJbtn.setEnabled(false);
						deleteActionJbtn.setEnabled(false);
					}
					getCounterEvidenceDetail(title);
					break;
				case "Bi-polar Questions":
					if (bipolarQuestionCurrent.getUserId().equals(userLogin.getName())
							&&  bipolarQuestionCurrent.getDialogType().equals(ACTIONPRIVATE)) {
						System.out.println(" title:" + currentClaim.getTitle());
						editDetailsJbtn.setEnabled(true);
						deleteActionJbtn.setEnabled(true);
					} else {
						editDetailsJbtn.setEnabled(false);
						deleteActionJbtn.setEnabled(false);
					}
					getBipolarQuestionDetail(title);
					break;
				case "Response to Bi-polar":
					if (bipolarQuestionCurrent.getUserId().equals(userLogin.getName())
							&&  bipolarQuestionCurrent.getDialogType().equals(ACTIONPRIVATE)) {
						editDetailsJbtn.setEnabled(true);
						deleteActionJbtn.setEnabled(true);
					} else {
						editDetailsJbtn.setEnabled(false);
						deleteActionJbtn.setEnabled(false);
					}
					getResponseBipolarDetail(title);
					break;
				case "Challenge":
					if (challengeCurrent.getUserId().equals(userLogin.getName())
							&&  challengeCurrent.getDialogType().equals(ACTIONPRIVATE)) {
						editDetailsJbtn.setEnabled(true);
						deleteActionJbtn.setEnabled(true);
					} else {
						editDetailsJbtn.setEnabled(false);
						deleteActionJbtn.setEnabled(false);
					}
					
					getChallengeDetail(title);
					break;
				}
			}
		});
		
		getTeamMemberRoles();
		getMaterialList();
		getTurnAndTime();
		getChatHistory();
		getClaimList();
		
		// Check team rep
		if (debateSelected.getCurentTurnTeam().equals(teamType)
				&& debateSelected.getTeamReps() != null
				&& (debateSelected.getTeamReps()[0].equals((userLogin.getName()))
				|| debateSelected.getTeamReps()[1].equals((userLogin.getName())))) {
			handoverTurnJbtn.setEnabled(true);
			withdrawJbtn.setEnabled(true);
			submitJbtn.setEnabled(true);
		} else if (debateSelected.getCurentTurnTeam().equals(teamType)
				&& debateSelected.getTeamReps() != null
				&& (debateSelected.getTeamReps()[0].equals((userLogin.getName()))
				|| debateSelected.getTeamReps()[1].equals((userLogin.getName())))) {
			
			handoverTurnJbtn.setEnabled(false);
			withdrawJbtn.setEnabled(false);
			submitJbtn.setEnabled(false);
		}
		
		if (debateSelected.getTeamReps()[0].equals((userLogin.getName()))
				|| debateSelected.getTeamReps()[1].equals((userLogin.getName()))) {
			acceptPositionJbtn.setEnabled(true);
		}
		
		//getSpecificClaim();
		
		// Public Panel
		publicDialogPanel = new JPanel();
		topicTitleJlbl = new JLabel("Topic: " + debateSelected.getTopic());
		topicTitleJlbl.setFont(new Font("Tahoma", 1, 16));
		teamAColorJlbl = new JLabel("Team A");
		teamAColorJlbl.setFont(new Font("Tahoma", 1, 16));
		teamBColorJlbl = new JLabel("Team B");
		teamBColorJlbl.setFont(new Font("Tahoma", 1, 16));
		shapeAColorJlbl = new JLabel();
		shapeAColorJlbl.setOpaque(true);
		shapeAColorJlbl.setBackground(new Color(111, 168, 220));
		shapeBColorJlbl = new JLabel();
		shapeBColorJlbl.setOpaque(true);
		shapeBColorJlbl.setBackground(new Color(147, 196, 125));
		
		
		// Main Panel
		GroupLayout mainLayout = new GroupLayout(getContentPane());
		getContentPane().setLayout(mainLayout);
		mainLayout
				.setHorizontalGroup(mainLayout.createParallelGroup()
						.addGroup(mainLayout.createSequentialGroup().addGap(10)
							.addComponent(nameJlbl))
						.addGroup(mainLayout.createSequentialGroup().addGap(10)
							.addComponent(teamPanel, GroupLayout.PREFERRED_SIZE, 200, GroupLayout.PREFERRED_SIZE)
							.addGap(10)
							.addGroup(mainLayout.createParallelGroup()
									.addComponent( publicPanel, GroupLayout.PREFERRED_SIZE, 750, GroupLayout.PREFERRED_SIZE)
									.addComponent(actionPanel, GroupLayout.PREFERRED_SIZE, 750, GroupLayout.PREFERRED_SIZE))
									.addGap(10).addComponent(chatPanel, GroupLayout.PREFERRED_SIZE,
												250, GroupLayout.PREFERRED_SIZE).addGap(10)));
		mainLayout.setVerticalGroup(mainLayout.createSequentialGroup()
			.addComponent(nameJlbl, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE).addGap(20)
			.addGroup(mainLayout.createParallelGroup()
					.addGroup(mainLayout.createSequentialGroup()
						.addComponent(teamPanel,GroupLayout.PREFERRED_SIZE, 620,GroupLayout.PREFERRED_SIZE))
						.addGroup(mainLayout.createSequentialGroup()
							.addComponent(publicPanel, GroupLayout.PREFERRED_SIZE,
									350, GroupLayout.PREFERRED_SIZE).addGap(10)
							.addComponent(actionPanel,GroupLayout.PREFERRED_SIZE, 250, GroupLayout.PREFERRED_SIZE)
							.addGap(10))
							.addGroup(mainLayout.createParallelGroup()
								.addComponent(chatPanel,GroupLayout.PREFERRED_SIZE, 600, GroupLayout.PREFERRED_SIZE))));
		
		
		// Team Panel
		GroupLayout teamLayout = new GroupLayout(teamPanel);
		teamPanel.setLayout(teamLayout);
		teamLayout.setHorizontalGroup(teamLayout.createParallelGroup()
				.addComponent(teamListPanel, GroupLayout.PREFERRED_SIZE, 200, GroupLayout.PREFERRED_SIZE)
				.addGroup(teamLayout.createSequentialGroup()
						.addGap(80).addComponent(setTeamRepJbtn))
				.addComponent(turnLeftJlbl, GroupLayout.PREFERRED_SIZE, 198, GroupLayout.PREFERRED_SIZE)
				.addComponent(timeLeftJlbl, GroupLayout.PREFERRED_SIZE, 198, GroupLayout.PREFERRED_SIZE)
				.addComponent(availableMaterialPanel, GroupLayout.PREFERRED_SIZE, 198, GroupLayout.PREFERRED_SIZE)
				.addGroup(teamLayout.createSequentialGroup()
						.addGap(100).addComponent(downloadJbtn))
				);
		teamLayout.setVerticalGroup(teamLayout.createSequentialGroup()
				.addComponent(teamListPanel, GroupLayout.PREFERRED_SIZE, 248, GroupLayout.PREFERRED_SIZE)
				.addGap(15).addComponent(setTeamRepJbtn)
				.addGap(15).addComponent(turnLeftJlbl).addGap(10)
				.addComponent(timeLeftJlbl).addGap(10)
				.addComponent(availableMaterialPanel, GroupLayout.PREFERRED_SIZE, 215, GroupLayout.PREFERRED_SIZE).addGap(10)
				.addComponent(downloadJbtn));
		// Team List Panel
		GroupLayout teamListLayout = new GroupLayout(teamListPanel);
		teamListPanel.setLayout(teamListLayout);
		teamListLayout.setHorizontalGroup(
				teamListLayout.createParallelGroup()
				.addComponent(teamJlbl, GroupLayout.PREFERRED_SIZE, 198, GroupLayout.PREFERRED_SIZE)
				.addComponent(teamLeaderJlbl, GroupLayout.PREFERRED_SIZE, 198, GroupLayout.PREFERRED_SIZE)
				.addComponent(teamLeaderJscl)
				.addComponent(teamRepJlbl, GroupLayout.PREFERRED_SIZE, 198, GroupLayout.PREFERRED_SIZE)
				.addComponent(teamRepJscl)
				.addComponent(teamMebJlbl, GroupLayout.PREFERRED_SIZE, 198, GroupLayout.PREFERRED_SIZE)
				.addComponent(teamMebJscl));
		teamListLayout.setVerticalGroup(teamListLayout.createSequentialGroup()
				.addComponent(teamJlbl, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
				.addComponent(teamLeaderJlbl, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
				.addComponent(teamLeaderJscl, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)
				.addComponent(teamRepJlbl, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
				.addComponent(teamRepJscl, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)
				.addComponent(teamMebJlbl, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
				.addComponent(teamMebJscl, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE));
		// Available Material Panel
		GroupLayout availableMaterialLayout = new GroupLayout(availableMaterialPanel);
		availableMaterialPanel.setLayout(availableMaterialLayout);
		availableMaterialLayout.setHorizontalGroup(availableMaterialLayout.createParallelGroup()
				.addComponent(availableMaterialJlbl, GroupLayout.PREFERRED_SIZE, 198, GroupLayout.PREFERRED_SIZE)
				.addComponent(availableMaterialJscl, GroupLayout.PREFERRED_SIZE, 198, GroupLayout.PREFERRED_SIZE));
		availableMaterialLayout.setVerticalGroup(availableMaterialLayout.createSequentialGroup()
				.addComponent(availableMaterialJlbl, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
				.addComponent(availableMaterialJscl, GroupLayout.PREFERRED_SIZE, 185, GroupLayout.PREFERRED_SIZE));
		
		
		// Chat Panel
		GroupLayout chatLayout = new GroupLayout(chatPanel);
		chatPanel.setLayout(chatLayout);
		chatLayout.setHorizontalGroup(chatLayout.createParallelGroup()
				.addComponent(chatJlbl)
				.addComponent(chatHistoryJscl, GroupLayout.PREFERRED_SIZE, 250, GroupLayout.PREFERRED_SIZE)
				.addComponent(chatInputJTxa, GroupLayout.PREFERRED_SIZE, 250, GroupLayout.PREFERRED_SIZE)
				.addGroup(chatLayout.createSequentialGroup()
						.addGap(20).addGroup(chatLayout.createParallelGroup()
							.addComponent(sendChatJbtn, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
							.addComponent(acceptPositionJbtn, GroupLayout.PREFERRED_SIZE, 150, GroupLayout.PREFERRED_SIZE)
							.addComponent(handoverTurnJbtn, GroupLayout.PREFERRED_SIZE, 150, GroupLayout.PREFERRED_SIZE)
							.addGroup(chatLayout.createSequentialGroup()
									.addComponent(logoutJbtn, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE).addGap(10)
									.addComponent(exitDebateJbtn, GroupLayout.PREFERRED_SIZE, 120, GroupLayout.PREFERRED_SIZE)))));
		chatLayout.setVerticalGroup(chatLayout.createSequentialGroup()
				.addComponent(chatJlbl).addGap(5)
				.addComponent(chatHistoryJscl, GroupLayout.PREFERRED_SIZE, 250, GroupLayout.PREFERRED_SIZE).addGap(10)
				.addComponent(chatInputJTxa, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE).addGap(20)
				.addComponent(sendChatJbtn, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE).addGap(30)
				.addComponent(acceptPositionJbtn, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE).addGap(10)
				.addComponent(handoverTurnJbtn, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
				.addGap(15).addGroup(chatLayout.createParallelGroup()
						.addComponent(logoutJbtn, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
						.addComponent(exitDebateJbtn, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)));
		
		// Action Panel
		GroupLayout actionLayout = new GroupLayout(actionPanel);
		actionPanel.setLayout(actionLayout);
		actionLayout.setHorizontalGroup(actionLayout.createSequentialGroup()
				.addGap(10).addGroup(actionLayout.createParallelGroup()
						.addGroup(actionLayout.createSequentialGroup()
								.addComponent(actionsListPanel, GroupLayout.PREFERRED_SIZE, 150, GroupLayout.PREFERRED_SIZE)
								.addGap(10).addComponent(resultsPanel, GroupLayout.PREFERRED_SIZE, 200, GroupLayout.PREFERRED_SIZE)
								.addGap(10).addComponent(descriptionPanel, GroupLayout.PREFERRED_SIZE, 360, GroupLayout.PREFERRED_SIZE))
						.addGroup(actionLayout.createSequentialGroup()
								.addGap(240).addComponent(addNewJbtn).addGap(10)
								.addComponent(editDetailsJbtn).addGap(10)
								.addComponent(deleteActionJbtn).addGap(10)
								.addComponent(withdrawJbtn).addGap(10)
								.addComponent(submitJbtn))));
		actionLayout.setVerticalGroup(actionLayout.createSequentialGroup()
				.addGroup(actionLayout.createParallelGroup()
						.addComponent(actionsListPanel)
						.addComponent(resultsPanel)
						.addComponent(descriptionPanel))
				.addGap(10).addGroup(actionLayout.createParallelGroup()
						.addComponent(addNewJbtn)
						.addComponent(editDetailsJbtn)
						.addComponent(deleteActionJbtn)
						.addComponent(withdrawJbtn)
						.addComponent(submitJbtn)));
		// Actions List Panel
		GroupLayout actionsListLayout = new GroupLayout(actionsListPanel);
		actionsListPanel.setLayout(actionsListLayout);
		actionsListLayout.setHorizontalGroup(actionsListLayout.createParallelGroup()
				.addComponent(actionsJlbl, GroupLayout.PREFERRED_SIZE, 150, GroupLayout.PREFERRED_SIZE)
				.addComponent(actionsListJscl));
		actionsListLayout.setVerticalGroup(actionsListLayout.createSequentialGroup()
				.addComponent(actionsJlbl, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
				.addComponent(actionsListJscl));
		// Result Titles List Panel
		GroupLayout resultsLayout = new GroupLayout(resultsPanel);
		resultsPanel.setLayout(resultsLayout);
		resultsLayout.setHorizontalGroup(resultsLayout.createParallelGroup()
				.addComponent(resultsJlbl, GroupLayout.PREFERRED_SIZE, 200, GroupLayout.PREFERRED_SIZE)
				.addGroup(resultsLayout.createSequentialGroup()
						.addComponent(titleJscl, GroupLayout.PREFERRED_SIZE, 200, GroupLayout.PREFERRED_SIZE)));
		resultsLayout.setVerticalGroup(resultsLayout.createSequentialGroup()
				.addComponent(resultsJlbl, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
				.addGroup(resultsLayout.createParallelGroup().addGap(10)
						.addGroup(resultsLayout.createSequentialGroup()
								.addComponent(titleJscl, GroupLayout.PREFERRED_SIZE, 180, GroupLayout.PREFERRED_SIZE))));
		// Description Panel
		GroupLayout descriptionLayout = new GroupLayout(descriptionPanel);
		descriptionPanel.setLayout(descriptionLayout);
		descriptionLayout.setHorizontalGroup(descriptionLayout.createParallelGroup()
				.addComponent(decriptionJlbl)
				.addComponent(descriptionJtxa, GroupLayout.PREFERRED_SIZE, 340, GroupLayout.PREFERRED_SIZE)
				.addGroup(descriptionLayout.createSequentialGroup()
						.addComponent(parentJlbl, GroupLayout.PREFERRED_SIZE, 150, GroupLayout.PREFERRED_SIZE).addGap(50)
						.addComponent(dialogJlbl))
				.addGroup(descriptionLayout.createSequentialGroup()
						.addComponent(parentContentJlbl, GroupLayout.PREFERRED_SIZE, 150, GroupLayout.PREFERRED_SIZE).addGap(50)
						.addComponent(dialogContentJlbl, GroupLayout.PREFERRED_SIZE, 150, GroupLayout.PREFERRED_SIZE))
				.addComponent(parentIdJlbl)
				.addComponent(playerJlbl)
				.addComponent(playerContentJlbl));
		descriptionLayout.setVerticalGroup(descriptionLayout.createSequentialGroup()
				.addComponent(decriptionJlbl).addGap(5)
				.addComponent(descriptionJtxa, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE).addGap(15)
				.addGroup(descriptionLayout.createParallelGroup()
						.addComponent(parentJlbl)
						.addComponent(dialogJlbl))
				.addGroup(descriptionLayout.createParallelGroup()
						.addComponent(parentContentJlbl)
						.addComponent(dialogContentJlbl)).addGap(15)
				.addComponent(parentIdJlbl)
				.addComponent(playerJlbl)
				.addComponent(playerContentJlbl));
		
		// Public Panel
		GroupLayout publicLayout = new GroupLayout(publicPanel);
		publicPanel.setLayout(publicLayout);
		publicLayout.setHorizontalGroup(publicLayout.createParallelGroup()
				.addGroup(publicLayout.createSequentialGroup()
						.addComponent(topicTitleJlbl).addGap(380)
						.addComponent(shapeAColorJlbl, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE).addGap(5)
						.addComponent(teamAColorJlbl).addGap(20)
						.addComponent(shapeBColorJlbl, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE).addGap(5)
						.addComponent(teamBColorJlbl))
				.addComponent(publicDialogPanel, GroupLayout.PREFERRED_SIZE, 750, GroupLayout.PREFERRED_SIZE));
		publicLayout.setVerticalGroup(publicLayout.createSequentialGroup()
				.addGroup(publicLayout.createParallelGroup()
						.addComponent(topicTitleJlbl, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
						.addComponent(shapeAColorJlbl, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
						.addComponent(teamAColorJlbl, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
						.addComponent(shapeBColorJlbl, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE)
						.addComponent(teamBColorJlbl, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
				.addComponent(publicDialogPanel, GroupLayout.PREFERRED_SIZE, 330, GroupLayout.PREFERRED_SIZE));
		publicDialog = new PublicDailog(publicFileName);
		publicDialogPanel.add(publicDialog);
		// Refresh the public dialog in certain time 
		Timer timer = new Timer();  
		   timer.schedule(new TimerTaskTest(), 1000, 2000); 
		pack();
	}