private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

        file = new File(fileName.getText());

        if (file == null || !file.exists()) {
            JOptionPane.showMessageDialog(this, "Invalid File. Please select valid file to continue", "Error", JOptionPane.ERROR_MESSAGE);
        } else {
            if ("Server".equalsIgnoreCase(type)) {
                new Contract().createServerContract(Helpers.fileToString(file).trim());
            } else if ("Asset".equalsIgnoreCase(type)){
                new Contract().createAssetContract(Helpers.fileToString(file).trim());
            }
            this.dispose();
        }
}//GEN-LAST:event_jButton1ActionPerformed