private void calculateButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_calculateButtonActionPerformed
    {//GEN-HEADEREND:event_calculateButtonActionPerformed
        this.logOutput.setText(""); //clear log
        IPv4Adress ip = null;
        SubnetMask mask = null;
        try
        {
            ip = new IPv4Adress(this.networkAdressInput.getText());
        }
        catch (SubneterException ex)
        {
            log("ERROR: Network Adress is invalid");
        }
        try
        {
            mask = new SubnetMask(this.subnetMaskInput.getText());
        }
        catch (SubneterException ex)
        {
            log("ERROR: Subnetmask is invalid");
        }
        if (ip != null && mask != null)
        {
            Subnet subnet = null;
            try
            {
                subnet = new Subnet(ip, mask);
            }
            catch (SubneterException ex)
            {
                log("ERROR: Invalid network");
            }
            if (subnet != null)
            {
                log("Network:");
                log(subnet.shortInfo());
                log("");

                List<SubnetRequirement> requirements = ((SubnetRequirementListModel) (this.requirementList.getModel())).getList();

                try
                {
                    this.result = Subneter.calculate(subnet, requirements);
                    log("Subnets:");
                    if (shortBox.isSelected())
                    {
                        log(Subneter.generateShortInfo(result));
                    }
                    else
                    {
                        log(Subneter.generateInfo(result));
                    }
                }
                catch (SubneterException ex)
                {
                    this.result = null;
                    log("ERROR: Subnet ist to small for that number of hosts");
                }
            }
        }
        else
        {
            this.result = null;
        }
    }//GEN-LAST:event_calculateButtonActionPerformed