private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed
        // TODO add your handling code here:                
        this.DeleteData();
        jTextArea1.setText("");
        jTextArea2.setText("");
        inputX = Integer.valueOf(jTextField1.getText());

        //Kombinasi
        int n=inputX;
        int k=2;

        if (n<k){
            JOptionPane.showMessageDialog(null,"Data Salah","Error",JOptionPane.ERROR_MESSAGE);
        } else if (n==k){
            hkom=1;
            jLabel4.setText("Jumlah Kombinasi : "+hkom);
        } else if (n>k) {

            long fakn=1;
            long fakk=1;
            long faknmink=1;
            for (int N=n;N>=1;N--){
                fakn=fakn*N;                
            }
            for (int K=k;K>=1;K--){
                fakk*=K;
            }
            for (int NminK=n-k;NminK>=1;NminK--){
                faknmink*=NminK;
            }  
            hkom=(int) (fakn/(faknmink*fakk));
            jLabel4.setText("Jumlah Kombinasi : "+hkom);
        }             
        //
        if (hkom<=0){
            JOptionPane.showMessageDialog(null,"Hasil Kombinasi Kurang dari atau sama dengan 0","Error",JOptionPane.ERROR_MESSAGE);
        }else{
            int i=2;
            for (int x=1;x<=inputX-1;x++){
                for (int y=i;y<=inputX;y++){
                    this.InsertData(x,y,0);
                }i+=1;
            }            
        }
        this.SelectData();
    }//GEN-LAST:event_jTextField1ActionPerformed