private void stopButtonActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_stopButtonActionPerformed
   portScaner.setStopFlag(false);
 } // GEN-LAST:event_stopButtonActionPerformed
  private void scanButtonActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_scanButtonActionPerformed
    portScaner.setStopFlag(true);
    if (urlTextField.getText().length() > 1) {
      portScaner.setIp(urlTextField.getText());
      if (allPortsRadio.isSelected()) {
        portScaner.setSinglePortFlag(false);
        portScaner.setPortRangeFlag(false);
      } else if (singlePortRadio.isSelected()) {
        portScaner.setSinglePort(Integer.parseInt(startPortTextField.getText()));
        portScaner.setSinglePortFlag(true);
        portScaner.setPortRangeFlag(false);
      } else if (portRangeRadio.isSelected()) {
        portScaner.setSinglePortFlag(false);
        portScaner.setPortRangeFlag(true);
        portScaner.setS(Integer.parseInt(startPortTextField.getText()));
        portScaner.setF(Integer.parseInt(endPortField.getText()));
      } else {
        outPutArea.setText(
            outPutArea.getText()
                + "\n Invalid input please make sure you made the correct selection");
      }
      servisor.execute(portScaner);

    } else {
      outPutArea.setText(
          outPutArea.getText()
              + "\n Invalid input please make sure you entered the correct URL or ip address");
    }
  } // GEN-LAST:event_scanButtonActionPerformed
 public void setServisor(ExecutorService servisor) {
   this.servisor = servisor;
   portScaner.setServicsor(servisor);
 }
 /** Creates new form scanWindow */
 public scanWindow() {
   initComponents();
   portScaner.setOutPutArea(outPutArea);
   portScaner.setProgressBar(progressBar);
 }