public void itemStateChanged(ItemEvent ev) {
				String ip = hostField.getText();
				String inPort = portField.getText();
				String address = ip + ":" + inPort;
				new FileLogins(address);
				int port = 0;
				int intport;
				
				if(ev.getStateChange() == ItemEvent.SELECTED) {
					connectBtn.setText("Disconnect");
					if(!(ip.equals(""))) {
						try{
							if(!(inPort.equals(""))) {
								intport = Integer.parseInt(inPort);
								port = intport;
								(new Thread(new TCPconnection(ip, port))).start();
							}else{
								System.out.println("Port field can not be empty!");
								System.out.println("Entered address ( " + address + " )\n");
								connectBtn.setSelected(true);
								connectBtn.doClick();
							}
						}catch(NumberFormatException nFE){
							displayMessage("Port is not an Integer!", 0);
							System.out.println("Entered address ( " + address + " )\n");
							connectBtn.setSelected(true);
							connectBtn.doClick();
						}
					}else{
						System.out.println("Host IP field can not be empty!");
						System.out.println("Entered address ( " + address + " )\n");
						connectBtn.setSelected(true);
						connectBtn.doClick();
					}
				}else{
					try {
						connectedGUIstate(false);
						TCPconnection.sendMessage("END");
					}catch(NullPointerException nullPointerException){
					}
				}
			}