@Override
    public void actionPerformed(ActionEvent actionEvent) {
        if(actionEvent.getSource() == knownZombies) {
            FoundServer found = (FoundServer)knownZombies.getSelectedItem();
            if(found != null) {
                String connectAddr = found.getIPv4() + ":" + found.getPort();
                addr.setText(connectAddr);
            }
        }
        if(actionEvent.getSource() == scan) {
            performNetworkScan();
        }
        if(actionEvent.getSource() == connect) {
            try {
                String[] conAdr = addr.getText().split(":");
                if(conAdr.length != 2)
                    throw new Exception("the ip does not seem to be proper");
                iface.connectTo(conAdr[0],Integer.parseInt(conAdr[1]));
            } catch (Exception e) {
                JOptionPane.showMessageDialog(null,e.getClass().getName() + ":" +  e.getMessage(),"Connection Error",JOptionPane.ERROR_MESSAGE);
            }
        }
    }