Results 1 to 8 of 8
  1. #1
    Tawi is offline Senior Member
    Join Date
    Feb 2013
    Posts
    118
    Rep Power
    0

    Default Please help with my program

    Java Code:
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    package proyektesis;
    
    /**
     *
     * @author Tawi
     */
    import java.sql.*;   
    import javax.swing.*;
    
    public class ProyekTesis extends BaruFrame {
    int i; 
    public void connectToDB() { 
                    try {  
                        Class.forName(driver);  
                        connection = DriverManager.getConnection(uniRL, usrname, psswrd);  
                        statusKoneksi.setText("Terhubung ke Paduk Data"); }  
                    catch (java.lang.Exception x) { 
                        x.printStackTrace();
                        statusKoneksi.setText("Gagal Terhubung ke Paduk Data"); }}
    public ProyekTesis() {
    setLayout(null);
    for (int itlo = 0; itlo < 2; itlo++) {lblPerhitunganKriteria[itlo] = new JLabel("Perhitungan Kriteria"); }
    for (int tlo = 0; tlo < 2; tlo++) {
           kriteria[0][tlo] = new JLabel("Kriteria 1");  
           kriteria[1][tlo] = new JLabel("Kriteria 2");  
           kriteria[2][tlo] = new JLabel("Kriteria 3");  
           kriteria[3][tlo] = new JLabel("Kriteria 4");  
           alternatif[0][tlo] = new JLabel("Alternatif 1");  
           alternatif[1][tlo] = new JLabel("Alternatif 2");  
           alternatif[2][tlo] = new JLabel("Alternatif 3");  
           alternatif[3][tlo] = new JLabel("Alternatif 4");  
           alternatif[4][tlo] = new JLabel("Alternatif 5"); }   
    for (int klof = 0; klof < 5; klof++) {for (int mobil = 0; mobil < 2; mobil++) {jawabAlternatif[klof][mobil] = new JTextField(10); }}
    for (int plof = 0; plof < 4; plof++) {for (int kekar = 0; kekar < 2; kekar++) {jawabKriteria[plof][kekar] = new JTextField(10); }}
    for (int m = 0; m <5; m++)  {for (int prodi = 0; prodi < 2; prodi++)  {
          jawabAlternatif[m][prodi].setEditable(false);    
          jawabAlternatif[m][prodi].setVisible(false); }}  
    for (int hki = 0; hki < 4; hki++)  {for (int hse = 0; hse < 2; hse++) {
          jawabKriteria[hki][hse].setEditable(false);    
          jawabKriteria[hki][hse].setVisible(false);}}   
    kriteria[0][0].setBounds(1,210,100,25);  
    kriteria[1][0].setBounds(1,240,100,25);  
    kriteria[2][0].setBounds(1,270,100,25);  
    kriteria[3][0].setBounds(1,300,100,25);  
    for (int lop = 0; lop < 4; lop++) {add(kriteria[lop][0]); }    
    jawabKriteria[0][0].setBounds(101,210,100,25);  
    jawabKriteria[1][0].setBounds(101,240,100,25);  
    jawabKriteria[2][0].setBounds(101,270,100,25);  
    jawabKriteria[3][0].setBounds(101,300,100,25);  
    for (int jki = 0; jki < 4; jki++) {add(jawabKriteria[jki][0]); }  
    alternatif[0][0].setBounds(200,210,100,25);  
    alternatif[1][0].setBounds(200,240,100,25);  
    alternatif[2][0].setBounds(200,270,100,25);  
    alternatif[3][0].setBounds(200,300,100,25);  
    alternatif[4][0].setBounds(200,330,100,25);  
    for (int loyo = 0; loyo < 5; loyo++) {add(alternatif[loyo][0]); }  
    jawabAlternatif[0][0].setBounds(360,210,70,25);  
    jawabAlternatif[1][0].setBounds(360,240,70,25);  
    jawabAlternatif[2][0].setBounds(360,270,70,25);  
    jawabAlternatif[3][0].setBounds(360,300,70,25);  
    jawabAlternatif[4][0].setBounds(360,330,70,25);  
    for (int gfk = 0; gfk < 5; gfk++) {add(jawabAlternatif[gfk][0]); }  
    stroke.setBounds(0,355,200,25);
    kriteria[0][1].setBounds(1,420,100,25);  
    kriteria[1][1].setBounds(1,450,100,25);  
    kriteria[2][1].setBounds(1,480,100,25);  
    kriteria[3][1].setBounds(1,510,100,25);  
    for (int gdu = 0; gdu < 4; gdu++) {add(kriteria[gdu][1]); }   
    jawabKriteria[0][1].setBounds(101,420,100,25);  
    jawabKriteria[1][1].setBounds(101,450,100,25);  
    jawabKriteria[2][1].setBounds(101,480,100,25);  
    jawabKriteria[3][1].setBounds(101,510,100,25);  
    for (int jku = 0; jku < 4; jku++) {add(jawabKriteria[jku][1]); }  
    alternatif[0][1].setBounds(200,420,100,25);  
    alternatif[1][1].setBounds(200,450,100,25);  
    alternatif[2][1].setBounds(200,480,100,25);  
    alternatif[3][1].setBounds(200,510,100,25);  
    alternatif[4][1].setBounds(200,540,100,25);  
    for (int loyom = 0; loyom < 5; loyom++) {add(alternatif[loyom][1]); }  
    jawabAlternatif[0][1].setBounds(360,420,70,25);  
    jawabAlternatif[1][1].setBounds(360,450,70,25);  
    jawabAlternatif[2][1].setBounds(360,480,70,25);  
    jawabAlternatif[3][1].setBounds(360,510,70,25);  
    jawabAlternatif[4][1].setBounds(360,540,70,25);  
    for (int gfki = 0; gfki < 5; gfki++) {add(jawabAlternatif[gfki][1]); }  
    add(logOff);
    add(lanjut);  
    lanjut.setEnabled(false);  
    lblNama.setBounds(0,10,100,25);  
    add(lblNama);  
    txtNama.setBounds(130,10,200,25);  
    add(txtNama);  
    kataSandi.setBounds(330,10,100,25);  
    add(kataSandi);  
    sandiKata.setBounds(410,10,200,25);  
    add(sandiKata);  
    masuk.setBounds(600,10,100,25);  
    add(masuk);  
    keluar.setBounds(700,10,100,25);  
    add(keluar);  
    myocardialInfarction.setBounds(0,90,200,25);
    lblPerhitunganKriteria[0].setBounds(0, 80, 200, 25);
    lblPerhitunganKriteria[1].setBounds(0, 375, 200, 25);
    for (int celt = 0; celt < 2; celt++) {
        lblPerhitunganKriteria[celt].setVisible(false);
        add(lblPerhitunganKriteria[celt]);
        lanjutlah[celt].setVisible(false);  
        perhitunganKriteria[celt].setVisible(false);  
        kmbl[celt].setVisible(false);  
        update[celt].setVisible(false); 
        kriteriaLanjut[celt].setVisible(false);}
    add(myocardialInfarction);
    tombolHubungkankePadukData.setBounds(0,50,250,25);  
    add(tombolHubungkankePadukData);  
    putuskanKoneksiKePadukData.setBounds(250,50,250,25);  
    add(putuskanKoneksiKePadukData);  
    tombolUbahPadukData.setBounds(480,50,250,25);  
    add(tombolUbahPadukData);  
    tombolBatal.setBounds(730,50,250,25);  
    add(tombolBatal);  
    statusKoneksi.setBounds(800,10,200,25);  
    add(statusKoneksi);  
    statusMasuk.setBounds(0,70,200,25);
    add(statusMasuk);
    tombolHubungkankePadukData.setEnabled(false);  
    putuskanKoneksiKePadukData.setEnabled(false);  
    tombolUbahPadukData.setEnabled(false);    
    tombolBatal.setEnabled(false);   
    statusKoneksi.setVisible(true);  
    lblNama.setVisible(true);  
    txtNama.setVisible(true);  
    kataSandi.setVisible(true);  
    sandiKata.setVisible(true);  
    masuk.setVisible(true);  
    keluar.setVisible(true);
    awal.setVisible(false);
    tombolHubungkankePadukData.setVisible(true);  
    putuskanKoneksiKePadukData.setVisible(true);  
    tombolUbahPadukData.setVisible(true);  
    tombolBatal.setVisible(true);  
    lanjut.setBounds(880,560,100,25);  
    add(lanjut);  
    lanjut.setEnabled(false);
    lanjut.setVisible(false);  
    jcboURL.setVisible(true);  
    jcboDriver.setVisible(true);  
    statusKoneksi.setVisible(true);
    padukData.setVisible(true);  
    myocardialInfarction.setVisible(false);  
    stroke.setVisible(false);  
    add(stroke); 
    for (int hklma = 0; hklma < kriteria.length; hklma++) {for (int kloaka = 0; kloaka < 2; kloaka++){kriteria[hklma][kloaka].setVisible(false); }}  
    for (int hklma = 0; hklma < alternatif.length; hklma++) {for (int kock = 0; kock <2; kock++) {alternatif[hklma][kock].setVisible(false);}}     
    statusMasuk.setVisible(true);  
    ubah.setVisible(false);  
    myocardInfarc.setVisible(false);  
    for (int hklma = 0; hklma < jawabKriteria1.length; hklma++) {for (int nyola = 0; nyola < jawabKriteria1[hklma].length; nyola++) {jawabKriteria1[hklma][nyola].setVisible(false); }}  
    for (int hklma = 0; hklma < jawabAlternatif1.length; hklma++) {for (int nyola = 0; nyola < jawabAlternatif1[hklma].length; nyola++) {jawabAlternatif1[hklma][nyola].setVisible(false); }}  
    for (int hklma = 0; hklma < labelLuarKriteria.length; hklma++) {for (int nyola = 0; nyola < labelLuarKriteria[hklma].length; nyola++) {labelLuarKriteria[hklma][nyola].setVisible(false); }}  
    for (int hklma = 0; hklma < labelLuarAlternatif.length; hklma++) {for (int nyola = 0; nyola < labelLuarAlternatif[hklma].length; nyola++) {labelLuarAlternatif[hklma][nyola].setVisible(false); }}  
    for (int hklma = 0; hklma < labelLuarAlternatif1.length; hklma++) {for (int nyola = 0; nyola < labelLuarAlternatif1[hklma].length; nyola++) {labelLuarAlternatif1[hklma][nyola].setVisible(false); }}  
    for (int hklm = 0; hklm < labelLuarKriteria1.length; hklm++) {for (int nyol = 0; nyol < labelLuarKriteria1[hklm].length; nyol++) {labelLuarKriteria1[hklm][nyol].setVisible(false); }}  
    masuk.addActionListener(new java.awt.event.ActionListener() {  
                String loginName;  
                String loginPassword;    
                String passwrd;
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {  
                    usrname = txtNama.getText().trim();  
                    psswrd = new String(sandiKata.getPassword());
                    for (int celtf = 0; celtf < 2; celtf++) {lblPerhitunganKriteria[celtf].setVisible(false); }
                    if (("".equals(usrname)) && ("".equals(psswrd)))  {  
                                   tombolHubungkankePadukData.setEnabled(false);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   tombolUbahPadukData.setEnabled(false);  
                                   tombolBatal.setEnabled(false);  
                                   masuk.setEnabled(true);
                                   statusKoneksi.setText(fx);
                                   keluar.setEnabled(true);  
                                   putuskanKoneksiKePadukData.setEnabled(false); 
                                   JOptionPane.showMessageDialog(null, cx, ex, JOptionPane.INFORMATION_MESSAGE); }  
                    else if ((!"".equals(usrname)) && ("".equals(psswrd))) {  
                                   JOptionPane.showMessageDialog(null, ax, ex, JOptionPane.INFORMATION_MESSAGE);  
                                   tombolHubungkankePadukData.setEnabled(false);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   tombolUbahPadukData.setEnabled(false);  
                                   tombolBatal.setEnabled(false); 
                                   masuk.setEnabled(true);
                                   statusKoneksi.setText(fx);
                                   keluar.setEnabled(true);  
                                   putuskanKoneksiKePadukData.setEnabled(false); }  
                    else if ((("".equals(usrname)) && (!"".equals(psswrd)))) {      
                                   tombolHubungkankePadukData.setEnabled(false);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   tombolUbahPadukData.setEnabled(false);  
                                   tombolBatal.setEnabled(false);  
                                   keluar.setEnabled(true);  
                                   masuk.setEnabled(true);
                                   statusKoneksi.setText(fx);
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   JOptionPane.showMessageDialog(null, bx, ex, JOptionPane.INFORMATION_MESSAGE); }       
                    else if ((!"".equals(usrname)) && (!"".equals(psswrd))) {connectToDB(); }
                    masuklah(); }  
                private void masuklah() {  
                    try {
                        if (connection.isClosed()) {  
                            masuk.setEnabled(true);  
                            entryPrg(); }  
                        else {
                            masuk.setEnabled(false);
                            entryPrg(); }
                    } catch (SQLException ex) {ex.printStackTrace(); }}   
                private void entryPrg() {  
                          connectToDB();
                          try {
                              statement = connection.createStatement();
                              pernyataan = connection.createStatement();
                              loginName = "select Nama_Dokter from tblDokterAhli where Nama_Dokter = '"+usrname+"'";  
                              loginPassword = "select Kata_Kunci from tblDokterAhli where Kata_Kunci = '"+psswrd+"' and Nama_Dokter = '"+usrname+"'";
                              ResultSet logName = statement.executeQuery(loginName);  
                              ResultSet logPassword = pernyataan.executeQuery(loginPassword);
                              while (logName.next()) {namaPengguna1 = logName.getString("Nama_Dokter"); }  
                              while (logPassword.next()) {passwordPengguna1 = logPassword.getString("Kata_Kunci"); }  
                              if ((!"".equals(namaPengguna1)) && (!"".equals(passwordPengguna1))) {  
                                   tombolHubungkankePadukData.setEnabled(true);  
                                   putuskanKoneksiKePadukData.setEnabled(true);  
                                   tombolUbahPadukData.setEnabled(true);  
                                   tombolBatal.setEnabled(true);  
                                   masuk.setEnabled(false);
                                   statusKoneksi.setText("Belum Terhubung ke Paduk Data");
                                   statusMasuk.setText("Sudah Masuk");
                                   keluar.setEnabled(true);  
                                   putuskanKoneksiKePadukData.setEnabled(true);  
                                   statement.close();
                                   connection.close();
                                   connection = null;
                                   pernyataan.close(); }  
                              else if (("".equals(namaPengguna1)) && (!"".equals(passwordPengguna1))) {  
                                   tombolHubungkankePadukData.setEnabled(false);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   tombolUbahPadukData.setEnabled(false);  
                                   tombolBatal.setEnabled(false);  
                                   keluar.setEnabled(true);
                                   masuk.setEnabled(true);
                                   statusKoneksi.setText(fx);
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   JOptionPane.showMessageDialog(null, dx, ex, JOptionPane.INFORMATION_MESSAGE);  
                                   connection.close();
                                   connection = null;
                                   statement.close();
                                   pernyataan.close(); }  
                             else if ((!"".equals(namaPengguna1)) && ("".equals(passwordPengguna1))) {  
                                   tombolHubungkankePadukData.setEnabled(false);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   tombolUbahPadukData.setEnabled(false);  
                                   tombolBatal.setEnabled(false);
                                   masuk.setEnabled(true);
                                   statusKoneksi.setText(fx);
                                   keluar.setEnabled(true);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   JOptionPane.showMessageDialog(null, dx, ex, JOptionPane.INFORMATION_MESSAGE);  
                                   connection.close();
                                   connection = null;
                                   statement.close();
                                   pernyataan.close(); }
                             else if (("".equals(namaPengguna1)) && ("".equals(passwordPengguna1)))  {  
                                   tombolHubungkankePadukData.setEnabled(false);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   tombolUbahPadukData.setEnabled(false);  
                                   tombolBatal.setEnabled(false);
                                   masuk.setEnabled(true);
                                   statusKoneksi.setText(fx);
                                   keluar.setEnabled(true);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   JOptionPane.showMessageDialog(null, dx, ex, JOptionPane.INFORMATION_MESSAGE);  
                                   connection.close();
                                   connection = null;
                                   statement.close();
                                   pernyataan.close(); }}  
                          catch (java.lang.Exception ex){ 
                              ex.printStackTrace();
                              statusMasuk.setText("Gagal Masuk");  }}});
    putuskanKoneksiKePadukData.addActionListener(new java.awt.event.ActionListener() {  
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {  
                    try {putuskan(); } catch (SQLException ex) {ex.printStackTrace();}}  
                private void putuskan() throws SQLException {      
                    if (connection != null)  {  
                         statusKoneksi.setText("Koneksi ke Paduk Data sudah Terputus");  
                      for (int lko = 0; lko < 4; lko++) {for (int ten = 0; ten < 2; ten++) {
                              kriteria[lko][ten].setVisible(false);
                              jawabKriteria[lko][ten].setEditable(false);  
                              jawabKriteria[lko][ten].setVisible(false); }}  
                      for (int lok = 0; lok < 5; lok++) {for (int songo = 0; songo < 2; songo++) {
                             alternatif[lok][songo].setVisible(false);
                             jawabAlternatif[lok][songo].setEditable(false);   
                             jawabAlternatif[lok][songo].setVisible(false); }}      
                      connection.close();
                      connection = null;
                      statement.close();
                      pernyataan.close();
                      lanjut.setVisible(false);
                      lanjut.setEnabled(false);}
                    else {
                       statusKoneksi.setText(fx);  
                       myocardialInfarction.setVisible(false);
                       stroke.setVisible(false);
                       for (int ltu = 0; ltu < 4; ltu++) {for (int wolu = 0; wolu < 2; wolu++) {
                               kriteria[ltu][wolu].setVisible(false);
                               jawabKriteria[ltu][wolu].setEditable(false);  
                               jawabKriteria[ltu][wolu].setVisible(false); }}  
                       for (int tlu = 0; tlu < 5; tlu++) {for (int papat = 0; papat < 2; papat++) {
                               jawabAlternatif[tlu][papat].setEditable(false);  
                               jawabAlternatif[tlu][papat].setVisible(false);  
                               alternatif[tlu][papat].setVisible(false); }}}  
                    myocardialInfarction.setVisible(false);
                    stroke.setVisible(false); }});  
    keluar.addActionListener(new java.awt.event.ActionListener() {  
             @Override  
             public void actionPerformed(java.awt.event.ActionEvent evt) {keluar();}  
             private void keluar() {System.exit(0);}});  
    tombolHubungkankePadukData.addActionListener(new java.awt.event.ActionListener() {  
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {  
                        if (connection != null) {statusKoneksi.setText("Sudah Terhubung ke Paduk Data");}  
                        else {connectToDB(); }}});  
    tombolBatal.addActionListener(new java.awt.event.ActionListener() {  
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {batal();  }  
                private void batal() { 
                        if (connection != null) {                      
                          myocardialInfarction.setVisible(false);
                          stroke.setVisible(false);
                          for (int k = 0; k < 4; k++)  {for (int kipas = 0; kipas < 2; kipas++) {
                                jawabKriteria[k][kipas].setText("");   
                                kriteria[k][kipas].setVisible(false); }}  
                          for (int lkm = 0; lkm < 5; lkm++) {for (int kitas = 0; kitas < 2; kitas++) {
                                jawabAlternatif[lkm][kitas].setText("");  
                                alternatif[lkm][kitas].setVisible(false); }}  
                          for (int lqj = 0; lqj < 4; lqj++) {for (int lopker = 0; lopker < 2; lopker++) {
                                jawabKriteria[lqj][lopker].setEditable(false);  
                                jawabKriteria[lqj][lopker].setVisible(false); }}  
                          for (int ljq = 0; ljq < 5; ljq++) {for (int klopker = 0; klopker < 2; klopker++){
                                jawabAlternatif[ljq][klopker].setEditable(false);    
                                jawabAlternatif[ljq][klopker].setVisible(false); }}
                                lanjut.setEnabled(false); 
                                lanjut.setVisible(false);}
                        else {JOptionPane.showMessageDialog(null, "Hubungkan Dahulu ke Paduk Data", fx, JOptionPane.INFORMATION_MESSAGE); }}});  
    lanjut.addActionListener(new java.awt.event.ActionListener() {  
          @Override  
          public void actionPerformed(java.awt.event.ActionEvent evt) {kontinu(); }  
          private void kontinu() {  
              setSize(1024,768);  
              setVisible(true);
              setTitle("Penghitungan Data");
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
              setLocationRelativeTo(null);  
              String[][] passCriteriaVariables = new String[4][2];  
              String[][] passAlternativeVariables = new String[5][2];  
              for (int ijkl = 0; ijkl < passCriteriaVariables.length; ijkl++) {for (int ikjl = 0; ikjl < passCriteriaVariables[ijkl].length; ikjl++) {passCriteriaVariables[ijkl][ikjl] = new String(); }}  
              for (int aijkl = 0; aijkl < 4; aijkl++) {for (int aikjl = 0; aikjl < 2; aikjl++) {passCriteriaVariables[aijkl][aikjl] = jawabKriteria[aijkl][aikjl].getText();  }}  
              for (int laijkl = 0; laijkl < passAlternativeVariables.length; laijkl++) {for (int laikjl = 0; laikjl < passAlternativeVariables[laijkl].length; laikjl++) {passAlternativeVariables[laijkl][laikjl] = new String(); }}  
              for (int lijkl = 0; lijkl < 5; lijkl++) {for (int likjl = 0; likjl < 2; likjl++) {passAlternativeVariables[lijkl][likjl] = jawabAlternatif[lijkl][likjl].getText(); }}  
              posisiKriteria();
              lblKriteria = passCriteriaVariables;
              lblAlternatif = passAlternativeVariables;
              for (int olp = 0; olp <4; olp++) {  
                   labelLuarKriteria[olp][0].setText(lblKriteria[olp][0]);  
                   labelLuarKriteria1[olp][0].setText(lblKriteria[olp][0]); }  
              for (int olt = 0; olt < 4; olt++) {  
                   labelLuarKriteria[olt][1].setText(lblKriteria[olt][1]);  
                   labelLuarKriteria1[olt][1].setText(lblKriteria[olt][1]); }  
              for (int yul = 0; yul < 4; yul++) {
                   labelLuarKriteria[yul][0].setVisible(true);  
                   labelLuarKriteria1[yul][0].setVisible(true);  
                   labelLuarKriteria[yul][1].setVisible(true);  
                   labelLuarKriteria1[yul][1].setVisible(true);}
              logOff.setBounds(506,700,200,25);
              lblNama.setVisible(false);  
              txtNama.setVisible(false);  
              kataSandi.setVisible(false);  
              sandiKata.setVisible(false);  
              masuk.setVisible(false);  
              keluar.setVisible(false); 
              awal.setVisible(true);
              myocardialInfarction.setBounds(0,60,200,25);
              tombolHubungkankePadukData.setVisible(false);  
              putuskanKoneksiKePadukData.setVisible(false);  
              tombolUbahPadukData.setVisible(false);  
              tombolBatal.setVisible(false);  
              lanjut.setVisible(false);  
              jcboURL.setVisible(false);  
              jcboDriver.setVisible(false);  
              statusKoneksi.setVisible(false);  
              padukData.setVisible(false);  
              myocardialInfarction.setVisible(true);  
              stroke.setVisible(true);  
              for (int hklma = 0; hklma < kriteria.length; hklma++) {for (int nyola = 0; nyola < kriteria[hklma].length; nyola++) {kriteria[hklma][nyola].setVisible(false); }}  
              for (int hklmaf = 0; hklmaf < jawabAlternatif1.length; hklmaf++) {for (int nyolaf = 0; nyolaf < jawabAlternatif1[hklmaf].length; nyolaf++) {jawabAlternatif1[hklmaf][nyolaf].setVisible(false); }}  
              for (int hklma = 0; hklma < alternatif.length; hklma++) {for (int nyola = 0; nyola < alternatif[hklma].length; nyola++) {alternatif[hklma][nyola].setVisible(false); }}  
              statusMasuk.setVisible(false);  
              for (int celta = 0; celta < lblPerhitunganKriteria.length; celta++) {lblPerhitunganKriteria[celta].setVisible(true); } 
              ubah.setVisible(true);
              for (int okb = 0; okb < 2; okb++){
                  lanjutlah[okb].setVisible(true);  
                  perhitunganKriteria[okb].setVisible(false);  
                  kmbl[okb].setVisible(false);  
                  update[okb].setVisible(false);  
                  kriteriaLanjut[okb].setVisible(false); 
                  jawabKriteria1[0][okb].setEnabled(false);
                  jawabKriteria1[0][okb].setVisible(true);
                  jawabKriteria1[0][okb].setText("1");
                  jawabKriteria1[5][okb].setEnabled(false);
                  jawabKriteria1[5][okb].setVisible(true);
                  jawabKriteria1[5][okb].setText("1");
                  jawabKriteria1[10][okb].setEnabled(false);
                  jawabKriteria1[10][okb].setVisible(true);
                  jawabKriteria1[10][okb].setText("1");
                  jawabKriteria1[15][okb].setEnabled(false);
                  jawabKriteria1[15][okb].setVisible(true);
                  jawabKriteria1[15][okb].setText("1");}  
              logOff.setVisible(true);
              for (int tql = 1; tql < 4; tql++){for (int wql = 0; wql < jawabKriteria1[tql].length; wql++){
                   jawabKriteria1[tql][wql].setEnabled(false);
                   jawabKriteria1[tql][wql].setVisible(true);}}
              for (int tql = 6; tql < 8; tql++){for (int wql = 0; wql < jawabKriteria1[tql].length; wql++){
                   jawabKriteria1[tql][wql].setEnabled(false);
                   jawabKriteria1[tql][wql].setVisible(true);}}
              for (int wql = 0; wql < jawabKriteria1[11].length; wql++){
                   jawabKriteria1[11][wql].setEnabled(false);
                   jawabKriteria1[11][wql].setVisible(true);}     
              for (int hklma = 12; hklma < 15; hklma++) {for (int kliop = 0; kliop < jawabKriteria1[hklma].length; kliop++) {
                   jawabKriteria1[hklma][kliop].setVisible(true); 
                   jawabKriteria1[hklma][kliop].setText("");
                   jawabKriteria1[hklma][kliop].setEnabled(true);}}
              for (int hklma = 8; hklma < 10; hklma++) {for (int kliop = 0; kliop < jawabKriteria1[hklma].length; kliop++) {
                   jawabKriteria1[hklma][kliop].setText("");
                   jawabKriteria1[hklma][kliop].setEnabled(true);
                   jawabKriteria1[hklma][kliop].setVisible(true);}}
              for (int kliop = 0; kliop < jawabKriteria1[4].length; kliop++) {
                   jawabKriteria1[4][kliop].setVisible(true); 
                   jawabKriteria1[4][kliop].setText("");
                   jawabKriteria1[4][kliop].setEnabled(true); }
              for (int hklma = 0; hklma < labelLuarKriteria.length; hklma++) {for (int nyola = 0; nyola < labelLuarKriteria[hklma].length; nyola++) {labelLuarKriteria[hklma][nyola].setVisible(true); }}  
              for (int hklma = 0; hklma < labelLuarAlternatif.length; hklma++) {for (int nyola = 0; nyola < labelLuarAlternatif[hklma].length; nyola++) {labelLuarAlternatif[hklma][nyola].setVisible(true); }}  
              for (int hklma = 0; hklma < labelLuarAlternatif1.length; hklma++) {for (int nyola = 0; nyola < labelLuarAlternatif1[hklma].length; nyola++) {labelLuarAlternatif1[hklma][nyola].setVisible(true); }}  
              for (int hklm = 0; hklm < labelLuarKriteria1.length; hklm++) {for (int nyol = 0; nyol < labelLuarKriteria1[hklm].length; nyol++) {labelLuarKriteria1[hklm][nyol].setVisible(true); }}  
              for (int hklmg = 0; hklmg < jawabKriteria.length; hklmg++) {for (int nyolg = 0; nyolg < jawabKriteria[hklmg].length; nyolg++) {jawabKriteria[hklmg][nyolg].setVisible(false); }}  
              for (int hklmga = 0; hklmga < jawabAlternatif.length; hklmga++) {for (int nyolga = 0; nyolga < jawabAlternatif[hklmga].length; nyolga++) {jawabAlternatif[hklmga][nyolga].setVisible(false); }}}}); //FrameBaru baru = new FrameBaru(passCriteriaVariables, passAlternativeVariables); // I want to make a class that is named FrameBaru to be visible   
    tombolUbahPadukData.addActionListener(new java.awt.event.ActionListener() {  
       @Override  
       public void actionPerformed(java.awt.event.ActionEvent evt) {  
           try {ubah();
           } catch (SQLException ex) {
               ex.printStackTrace();
               statusKoneksi.setText("Gagal Terhubung dengan Paduk Data"); }}   
       private void ubah() throws SQLException { 
               if (connection != null) {
                      for (int lmo = 0; lmo < 4; lmo++) {  
                          for (int jmo = 0; jmo < 2; jmo++){
                              jawabKriteria[lmo][jmo].setEditable(true);
                              jawabKriteria[lmo][jmo].setVisible(true);
                              jawabKriteria[lmo][jmo].setText("");
                              kriteria[lmo][jmo].setVisible(true); 
                              kriteria[lmo][jmo].setEnabled(true);}}  
                     for (int mlo = 0; mlo < 5; mlo++)  {
                         for (int hlok = 0; hlok < 2; hlok++) {
                              jawabAlternatif[mlo][hlok].setEditable(true);  
                              jawabAlternatif[mlo][hlok].setVisible(true);
                              jawabAlternatif[mlo][hlok].setText("");
                              alternatif[mlo][hlok].setVisible(true);
                              alternatif[mlo][hlok].setEnabled(true); }}  
                     lanjut.setEnabled(true); 
                     lanjut.setVisible(true);
                     logOff.setBounds(880,600,100,25);
                     logOff.setVisible(true);
                     myocardialInfarction.setBounds(0, 160, 200, 25);
                     myocardialInfarction.setVisible(true);
                     stroke.setVisible(true); }
               else {JOptionPane.showMessageDialog(null, "Hubungkan Dahulu ke Paduk Data", fx, JOptionPane.INFORMATION_MESSAGE); }}});}
    public static void main(String[] args) {  
            ProyekTesis tesis = new ProyekTesis();   
            tesis.setTitle("Program Pemilihan Obat dengan Cara Analytic Hierarchycal Process");  
            tesis.setSize(1024,768);  
            tesis.setVisible(true);  
            tesis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
            tesis.setLocationRelativeTo(null); }}

  2. #2
    Tawi is offline Senior Member
    Join Date
    Feb 2013
    Posts
    118
    Rep Power
    0

    Default Re: Please help with my program

    From the above code, why do I get NPE? Can I make it shorter?

  3. #3
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,958
    Rep Power
    8

    Default Re: Please help with my program

    I close your other thread for a reason. All of the advice you've already received still stands. This isn't how you ask questions. See the link in my signature on asking questions the smart way before you post again.

    If you keep posting without attempting anything anybody has told you, I'm going to ban you. There are plenty of other people willing to work with the advice they've received that we could be helping instead.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  4. #4
    Tawi is offline Senior Member
    Join Date
    Feb 2013
    Posts
    118
    Rep Power
    0

    Default Re: Please help with my program

    Java Code:
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    package proyektesis;
    
    import java.sql.Connection;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.swing.*;
    
    /**
     *
     * @author Tawi
     */
    class BaruFrame extends JFrame{
          int c = 0;
          int d = 0;
          int e = 0;
          JFrame kriteriaInkonsisten = new JFrame();
          JFrame alternatifKriteria1 = new JFrame();
          JFrame alternatifKriteria2 = new JFrame();
          JFrame alternatifKriteria3 = new JFrame();
          JFrame alternatifKriteria4 = new JFrame();
          JLabel lblNama = new JLabel("Nama : ");  
          JTextField txtNama = new JTextField();  
          JLabel kataSandi = new JLabel("Kata Sandi : ");  
          JPasswordField sandiKata = new JPasswordField();  
          JButton masuk = new JButton("Masuk");  
          JButton keluar = new JButton("Keluar");
          JLabel statusKoneksi = new JLabel("Belum ada Koneksi ke Paduk Data");
          JLabel[] lblPerhitunganKriteria = new JLabel[2];
          JLabel[] labelKriteria = new JLabel[2];
          JButton tombolHubungkankePadukData = new JButton("Hubungkan ke Paduk Data");  
          JButton putuskanKoneksiKePadukData = new JButton("Putuskan Koneksi ke Paduk Data");  
          JButton tombolUbahPadukData = new JButton("Ubah Paduk Data");  
          JButton tombolBatal = new JButton("Batal");  
          JButton lanjut = new JButton("Lanjut");  
          JButton logOff = new JButton("Log Off");
          JComboBox jcboURL = new JComboBox (new String[] {"jdbc:odbc:DatabaseKlinik"});  
          JComboBox jcboDriver = new JComboBox (new String[] {"sun.jdbc.odbc.JdbcOdbcDriver"});  
          Connection connection;  
          Statement statement;  
          Statement pernyataan;
          JLabel myocardialInfarction = new JLabel("Myocardial Infarction");  
          JLabel stroke = new JLabel("Stroke");  
          JLabel[][] kriteria = new JLabel[4][2];  
          JLabel[][] alternatif = new JLabel[5][2];  
          JTextField[][]jawabKriteria = new JTextField [4][2];  
          JTextField[][] jawabAlternatif = new JTextField[5][2];  
          JLabel statusMasuk = new JLabel("Belum Masuk");  
          JButton ubah = new JButton("Ubah Paduk Data");  
          JButton[] lanjutlah = new JButton[2];  
          JLabel padukData = new JLabel("Paduk Data Belum Diubah");  
          String namaPengguna1 = new String();  
          String passwordPengguna1 = new String();  
          String ax = "Kata Sandi Belum Dimasukkan";  
          String bx = "Nama Dokter Belum Dimasukkan";  
          String cx = "Nama Dokter dan Kata Sandi tidak Diisi";  
          String dx = "Nama Dokter atau Kata Sandi tidak Benar"; 
          String ex = "Kesalahan";
          String fx = "Tidak Ada Koneksi ke Paduk Data";
          String usrname = new String();
          String psswrd = new String();
          String uniRL = (String)jcboURL.getSelectedItem();  
          String driver = (String) jcboDriver.getSelectedItem();
          JButton[] perhitunganKriteria = new JButton[2];  
          JButton[] kmbl= new JButton[2];  
          JButton awal = new JButton("Awal");
          JButton update[] = new JButton[2];  
          JLabel myocardInfarc = new JLabel("Myocardial Infarction");  
          JTextField[][] jawabKriteria1 = new JTextField[16][2];  
          JTextField[][] jawabAlternatif1 = new JTextField[100][2];  
          JLabel[][] labelLuarKriteria = new JLabel[4][2];
          JLabel[][] labelLuarKriteria1 = new JLabel[4][2];
          JLabel[][] labelLuarAlternatif = new JLabel[5][2];  
          JLabel[][] labelLuarAlternatif1 = new JLabel[5][2];  
          String[][] lblKriteria = new String[4][2];  
          String[][] lblAlternatif = new String[5][2];   
          int xyz[] = new int[2]; 
          double MHPK[][] = new double[16][2]; // Matriks Hasil Perhitungan Kriteria Iterasi I
          double MHPK1[][] = new double[16][2]; // Matriks Hasil Perhitungan Kriteria Iterasi II
          double MHPA[][] = new double[100][2]; // Matriks Hasil Perhitungan Alternatif Iterasi I
          double MHPA1[][] = new double[100][2]; // Matriks Hasil Perhitungan Alternatif iterasi II
          double HJBK[][] = new double[5][2]; // Hasil Jumlah Baris Kriteria Iterasi 1
          double HJBK1[][] = new double[5][2]; // Hasil Jumlah Baris Kriteria Iterasi 2
          double bobotKriteria[][] = new double[4][2]; //Bobot Kriteria
          double bobotAlternatif[][] = new double[20][2]; // Bobot Alternatif
          double nilaiEigenA[][] = new double[20][2]; // Nilai Eigen Alternatif
          double nilaiEigenK[][] = new double[4][2]; //Nilai Eigen Kriteria
          double lamdaKriteria[][] = new double[1][2]; // Nilai Lamda Kriteria
          double lamdaAlternatif[][] = new double[4][2]; // Nilai Lamda Alternatif
          double CIK[][] = new double[1][2]; // Consistency index Kriteria
          double CIA[][] = new double[4][2]; // Consistency index Alternatif
          double CRK[][] = new double[1][2]; // Consistency Ratio Kriteria
          double CRA[][] = new double[4][2]; // Consistency Ratio Alternatif
          double HNK[][] = new double[4][2]; // Hasil Normalisasi Kriteria Iterasi 1
          double HNK1[][] = new double[4][2]; // Hasil Normalisasi Kriteria Iterasi 2
          double DHNK[][] = new double[4][2]; // Hasil Delta Nilai Eigen
          double HJBA[][] = new double[24][2]; // Hasil Jumlah Baris Alternatif Iterasi I
          double HJBA1[][] = new double[24][2]; // Hasil Jumlah Baris Alternatif Iterasi II
          double HNA[][] = new double[20][2]; // Hasil Normalisasi Alternatif Iterasi I
          double HNA1[][] = new double[20][2]; // Hasil Normalisasi Alternatif Iterasi II
          double DHNA[][] = new double[20][2]; // Hasil Delta Nilai Eigen
          double MHPKT[][] = new double[16][2]; // Matriks Hasil Perhitungan Kriteria Iterasi I Transfer
          double MHPK1T[][] = new double[16][2]; // Matriks Hasil Perhitungan Kriteria Iterasi II Transfer
          double MHPAT[][] = new double[100][2]; // Matriks Hasil Perhitungan Alternatif Iterasi I Transfer
          double MHPA1T[][] = new double[100][2]; // Matriks Hasil Perhitungan Alternatif iterasi II Transfer
          double HJBKT[][] = new double[5][2]; // Hasil Jumlah Baris Kriteria Iterasi 1 Transfer
          double HJBK1T[][] = new double[5][2]; // Hasil Jumlah Baris Kriteria Iterasi 2 Transfer
          double HNKT[][] = new double[4][2]; // Hasil Normalisasi Kriteria Iterasi 1 Transfer
          double HNK1T[][] = new double[4][2]; // Hasil Normalisasi Kriteria Iterasi 2 Transfer
          double DHNKT[][] = new double[4][2]; // Hasil Delta Nilai Eigen Transfer
          double HJBAT[][] = new double[24][2]; // Hasil Jumlah Baris Alternatif Iterasi I Transfer
          double HJBA1T[][] = new double[24][2]; // Hasil Jumlah Baris Alternatif Iterasi II Transfer
          double HNAT[][] = new double[20][2]; // Hasil Normalisasi Alternatif Iterasi I Transfer
          double HNA1T[][] = new double[20][2]; // Hasil Normalisasi Alternatif Iterasi II Transfer
          double DHNAT[][] = new double[20][2]; // Hasil Delta Nilai Eigen Transfer
          double hitungFinal[][] = new double[5][2];
          boolean konsisten[] = new boolean[2];
          JButton[] kriteriaLanjut = new JButton[2]; 
          JButton[] prosesAlternatifInkonsisten = new JButton[4];
          JButton[] prosesKriteriaInkonsisten = new JButton[1];
          JButton[] alternatifTidakKonsistenSebelumnya = new JButton[4];
          JButton[] kriteriaTidakKonsistenSebelumnya = new JButton[1];
          String[][] variabelTampung = new String[100][2];
          String[][] variabelTampungK = new String[16][2];
     public  BaruFrame() {    
            setSize(1024,768);  
            this.setVisible(true);
            setTitle("Penghitungan Data");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
            setLocationRelativeTo(null);  
      
    setLayout(null); 
    for (int ijk = 0; ijk < labelLuarKriteria.length; ijk++) {for (int ikj = 0; ikj < labelLuarKriteria[ijk].length; ikj++) {labelLuarKriteria[ijk][ikj] = new JLabel(); }}
    for (int ijk = 0; ijk < prosesAlternatifInkonsisten.length; ijk++) {prosesAlternatifInkonsisten[ijk] = new JButton("Proses"); }
    for (int ijk = 0; ijk < prosesKriteriaInkonsisten.length; ijk++) {prosesKriteriaInkonsisten[ijk] = new JButton("Proses"); }
    for (int ijk = 0; ijk < alternatifTidakKonsistenSebelumnya.length; ijk++) {alternatifTidakKonsistenSebelumnya[ijk] = new JButton("Kriteria/Alternatif Tidak Konsisten Sebelumnya"); }
    for (int ijk = 0; ijk < kriteriaTidakKonsistenSebelumnya.length; ijk++) {kriteriaTidakKonsistenSebelumnya[ijk] = new JButton("Alternatif Tidak Konsisten Sebelumnya"); }
    for (int ijbak = 0; ijbak < labelLuarAlternatif.length; ijbak++) {for (int ikbaj = 0; ikbaj < labelLuarAlternatif[ijbak].length; ikbaj++) {labelLuarAlternatif[ijbak][ikbaj] = new JLabel(); }}  
    for (int ijbaki = 0; ijbaki < labelLuarAlternatif1.length; ijbaki++) {for (int ikbaji = 0; ikbaji < labelLuarAlternatif1[ijbaki].length; ikbaji++) {labelLuarAlternatif1[ijbaki][ikbaji] = new JLabel(); }}  
    for (int ijak = 0; ijak < labelLuarKriteria1.length; ijak++) {for (int ikaj = 0; ikaj < labelLuarKriteria1[ijak].length; ikaj++) {labelLuarKriteria1[ijak][ikaj] = new JLabel(); }}  
    for (int ijka = 0; ijka < lblKriteria.length; ijka++) {for (int ikja = 0; ikja < lblKriteria[ijka].length; ikja++) {lblKriteria[ijka][ikja] = new String(); }}  
    for (int ijkab = 0; ijkab < lblAlternatif.length; ijkab++) {for (int ikjab = 0; ikjab < lblAlternatif[ijkab].length; ikjab++) {lblAlternatif[ijkab][ikjab] = new String(); }}  
    for (int kijk = 0; kijk < jawabKriteria1.length; kijk++) {for (int kikj = 0; kikj < jawabKriteria1[kijk].length; kikj++) {jawabKriteria1[kijk][kikj] = new JTextField(); }}  
    for (int kabijk = 0; kabijk < jawabAlternatif1.length; kabijk++) {for (int kabikj = 0; kabikj < jawabAlternatif1[kabijk].length; kabikj++) {jawabAlternatif1[kabijk][kabikj] = new JTextField(); }}  
    for (int ijk = 0; ijk < prosesAlternatifInkonsisten.length; ijk++) {prosesAlternatifInkonsisten[ijk].setVisible(false); }
    for (int ijk = 0; ijk < prosesKriteriaInkonsisten.length; ijk++) {prosesKriteriaInkonsisten[ijk].setVisible(false); }
    for (int ijk = 0; ijk < alternatifTidakKonsistenSebelumnya.length; ijk++) {alternatifTidakKonsistenSebelumnya[ijk].setVisible(false); }
    for (int ijk = 0; ijk < kriteriaTidakKonsistenSebelumnya.length; ijk++) {kriteriaTidakKonsistenSebelumnya[ijk].setVisible(false); }
    for (int kli = 0; kli <2;kli++) {
        update[kli] = new JButton("Ubah Paduk Data");
        lanjutlah[kli] = new JButton("Lanjut");
        perhitunganKriteria[kli] = new JButton("Perhitungan Kriteria");
        kmbl[kli] = new JButton("");
        kriteriaLanjut[kli] = new JButton("");
        labelKriteria[kli] = new JLabel("");
        xyz[kli] = 0;    
        kmbl[kli].setVisible(false);
        update[kli].setVisible(false);
        labelKriteria[kli].setVisible(false);
        kriteriaLanjut[kli].setVisible(false);
        perhitunganKriteria[kli].setVisible(false);
        lanjutlah[kli].setVisible(false);
        add(update[kli]);
        add(lanjutlah[kli]);
        add(perhitunganKriteria[kli]);
        add(kmbl[kli]);
        add(kriteriaLanjut[kli]);
        add(labelKriteria[kli]);}
    alternatifKriteria1.setVisible(false);
    alternatifKriteria2.setVisible(false);
    alternatifKriteria3.setVisible(false);
    alternatifKriteria4.setVisible(false);
    myocardInfarc.setBounds(0,0,200,25); 
    awal.setBounds(809,700,200,25);
    labelLuarKriteria[0][0].setBounds(0,150,100,25);  
    labelLuarKriteria[1][0].setBounds(0,180,100,25);  
    labelLuarKriteria[2][0].setBounds(0,210,100,25);  
    labelLuarKriteria[3][0].setBounds(0,240,100,25);
    labelLuarKriteria1[0][0].setBounds(101,100,100,25);  
    labelLuarKriteria1[1][0].setBounds(202,100,100,25);  
    labelLuarKriteria1[2][0].setBounds(303,100,100,25);  
    labelLuarKriteria1[3][0].setBounds(404,100,100,25);  
    jawabKriteria1[0][0].setBounds(101,155,100,25);  
    jawabKriteria1[1][0].setBounds(101,185,100,25);  
    jawabKriteria1[2][0].setBounds(101,215,100,25);  
    jawabKriteria1[3][0].setBounds(101,245,100,25);  
    jawabKriteria1[4][0].setBounds(202,155,100,25);  
    jawabKriteria1[5][0].setBounds(202,185,100,25);  
    jawabKriteria1[6][0].setBounds(202,215,100,25);  
    jawabKriteria1[7][0].setBounds(202,245,100,25);  
    jawabKriteria1[8][0].setBounds(303,155,100,25);  
    jawabKriteria1[9][0].setBounds(303,185,100,25);  
    jawabKriteria1[10][0].setBounds(303,215,100,25);  
    jawabKriteria1[11][0].setBounds(303,245,100,25);  
    jawabKriteria1[12][0].setBounds(404,155,100,25);  
    jawabKriteria1[13][0].setBounds(404,185,100,25);  
    jawabKriteria1[14][0].setBounds(404,215,100,25);  
    jawabKriteria1[15][0].setBounds(404,245,100,25);  
    labelLuarAlternatif[0][0].setBounds(405,150,100,25);  
    labelLuarAlternatif[1][0].setBounds(405,180,100,25);  
    labelLuarAlternatif[2][0].setBounds(405,210,100,25);  
    labelLuarAlternatif[3][0].setBounds(405,240,100,25);  
    labelLuarAlternatif[4][0].setBounds(405,270,100,25);  
    labelLuarAlternatif1[0][0].setBounds(506,100,100,25);  
    labelLuarAlternatif1[1][0].setBounds(607,100,100,25);  
    labelLuarAlternatif1[2][0].setBounds(708,100,100,25);  
    labelLuarAlternatif1[3][0].setBounds(809,100,100,25);  
    labelLuarAlternatif1[4][0].setBounds(910,100,100,25);  
    lanjutlah[0].setBounds(403,300,100,25);  
    jawabAlternatif1[0][0].setBounds(506,150,100,25);  
    jawabAlternatif1[1][0].setBounds(506,180,100,25);  
    jawabAlternatif1[2][0].setBounds(506,210,100,25);  
    jawabAlternatif1[3][0].setBounds(506,240,100,25);  
    jawabAlternatif1[4][0].setBounds(506,270,100,25);  
    jawabAlternatif1[5][0].setBounds(607,150,100,25);  
    jawabAlternatif1[6][0].setBounds(607,180,100,25);  
    jawabAlternatif1[7][0].setBounds(607,210,100,25);  
    jawabAlternatif1[8][0].setBounds(607,240,100,25);  
    jawabAlternatif1[9][0].setBounds(607,270,100,25);  
    jawabAlternatif1[10][0].setBounds(708,150,100,25);  
    jawabAlternatif1[11][0].setBounds(708,180,100,25);  
    jawabAlternatif1[12][0].setBounds(708,210,100,25);  
    jawabAlternatif1[13][0].setBounds(708,240,100,25);  
    jawabAlternatif1[14][0].setBounds(708,270,100,25);  
    jawabAlternatif1[15][0].setBounds(809,150,100,25);  
    jawabAlternatif1[16][0].setBounds(809,180,100,25);  
    jawabAlternatif1[17][0].setBounds(809,210,100,25);  
    jawabAlternatif1[18][0].setBounds(809,240,100,25);  
    jawabAlternatif1[19][0].setBounds(809,270,100,25);  
    jawabAlternatif1[20][0].setBounds(910,150,100,25);  
    jawabAlternatif1[21][0].setBounds(910,180,100,25);  
    jawabAlternatif1[22][0].setBounds(910,210,100,25);  
    jawabAlternatif1[23][0].setBounds(910,240,100,25);  
    jawabAlternatif1[24][0].setBounds(910,270,100,25); 
    jawabAlternatif1[25][0].setBounds(506,150,100,25);  
    jawabAlternatif1[26][0].setBounds(506,180,100,25);  
    jawabAlternatif1[27][0].setBounds(506,210,100,25);  
    jawabAlternatif1[28][0].setBounds(506,240,100,25);  
    jawabAlternatif1[29][0].setBounds(506,270,100,25);  
    jawabAlternatif1[30][0].setBounds(607,150,100,25);  
    jawabAlternatif1[31][0].setBounds(607,180,100,25);  
    jawabAlternatif1[32][0].setBounds(607,210,100,25);  
    jawabAlternatif1[33][0].setBounds(607,240,100,25);  
    jawabAlternatif1[34][0].setBounds(607,270,100,25);  
    jawabAlternatif1[35][0].setBounds(708,150,100,25);  
    jawabAlternatif1[36][0].setBounds(708,180,100,25);  
    jawabAlternatif1[37][0].setBounds(708,210,100,25);  
    jawabAlternatif1[38][0].setBounds(708,240,100,25);  
    jawabAlternatif1[39][0].setBounds(708,270,100,25);  
    jawabAlternatif1[40][0].setBounds(809,150,100,25);  
    jawabAlternatif1[41][0].setBounds(809,180,100,25);  
    jawabAlternatif1[42][0].setBounds(809,210,100,25);  
    jawabAlternatif1[43][0].setBounds(809,240,100,25);  
    jawabAlternatif1[44][0].setBounds(809,270,100,25);  
    jawabAlternatif1[45][0].setBounds(910,150,100,25);  
    jawabAlternatif1[46][0].setBounds(910,180,100,25);  
    jawabAlternatif1[47][0].setBounds(910,210,100,25);  
    jawabAlternatif1[48][0].setBounds(910,240,100,25);  
    jawabAlternatif1[49][0].setBounds(910,270,100,25);
    jawabAlternatif1[50][0].setBounds(506,150,100,25);  
    jawabAlternatif1[51][0].setBounds(506,180,100,25);  
    jawabAlternatif1[52][0].setBounds(506,210,100,25);  
    jawabAlternatif1[53][0].setBounds(506,240,100,25);  
    jawabAlternatif1[54][0].setBounds(506,270,100,25);  
    jawabAlternatif1[55][0].setBounds(607,150,100,25);  
    jawabAlternatif1[56][0].setBounds(607,180,100,25);  
    jawabAlternatif1[57][0].setBounds(607,210,100,25);  
    jawabAlternatif1[58][0].setBounds(607,240,100,25);  
    jawabAlternatif1[59][0].setBounds(607,270,100,25);  
    jawabAlternatif1[60][0].setBounds(708,150,100,25);  
    jawabAlternatif1[61][0].setBounds(708,180,100,25);  
    jawabAlternatif1[62][0].setBounds(708,210,100,25);  
    jawabAlternatif1[63][0].setBounds(708,240,100,25);  
    jawabAlternatif1[64][0].setBounds(708,270,100,25);  
    jawabAlternatif1[65][0].setBounds(809,150,100,25);  
    jawabAlternatif1[66][0].setBounds(809,180,100,25);  
    jawabAlternatif1[67][0].setBounds(809,210,100,25);  
    jawabAlternatif1[68][0].setBounds(809,240,100,25);  
    jawabAlternatif1[69][0].setBounds(809,270,100,25);  
    jawabAlternatif1[70][0].setBounds(910,150,100,25);  
    jawabAlternatif1[71][0].setBounds(910,180,100,25);  
    jawabAlternatif1[72][0].setBounds(910,210,100,25);  
    jawabAlternatif1[73][0].setBounds(910,240,100,25);  
    jawabAlternatif1[74][0].setBounds(910,270,100,25);
    jawabAlternatif1[75][0].setBounds(506,150,100,25);  
    jawabAlternatif1[76][0].setBounds(506,180,100,25);  
    jawabAlternatif1[77][0].setBounds(506,210,100,25);  
    jawabAlternatif1[78][0].setBounds(506,240,100,25);  
    jawabAlternatif1[79][0].setBounds(506,270,100,25);  
    jawabAlternatif1[80][0].setBounds(607,150,100,25);  
    jawabAlternatif1[81][0].setBounds(607,180,100,25);  
    jawabAlternatif1[82][0].setBounds(607,210,100,25);  
    jawabAlternatif1[83][0].setBounds(607,240,100,25);  
    jawabAlternatif1[84][0].setBounds(607,270,100,25);  
    jawabAlternatif1[85][0].setBounds(708,150,100,25);  
    jawabAlternatif1[86][0].setBounds(708,180,100,25);  
    jawabAlternatif1[87][0].setBounds(708,210,100,25);  
    jawabAlternatif1[88][0].setBounds(708,240,100,25);  
    jawabAlternatif1[89][0].setBounds(708,270,100,25);  
    jawabAlternatif1[90][0].setBounds(809,150,100,25);  
    jawabAlternatif1[91][0].setBounds(809,180,100,25);  
    jawabAlternatif1[92][0].setBounds(809,210,100,25);  
    jawabAlternatif1[93][0].setBounds(809,240,100,25);  
    jawabAlternatif1[94][0].setBounds(809,270,100,25);  
    jawabAlternatif1[95][0].setBounds(910,150,100,25);  
    jawabAlternatif1[96][0].setBounds(910,180,100,25);  
    jawabAlternatif1[97][0].setBounds(910,210,100,25);  
    jawabAlternatif1[98][0].setBounds(910,240,100,25);  
    jawabAlternatif1[99][0].setBounds(910,270,100,25);
    perhitunganKriteria[0].setBounds(506,330,200,25);  
    perhitunganKriteria[1].setBounds(506,630,200,25);
    for (int tql = 1; tql < 5; tql++){for (int wql = 0; wql < jawabAlternatif1[tql].length; wql++){jawabAlternatif1[tql][wql].setEnabled(false);}}
    for (int tql = 7; tql < 10; tql++){for (int wql = 0; wql < jawabAlternatif1[tql].length; wql++){jawabAlternatif1[tql][wql].setEnabled(false);}}
    for (int tql = 13; tql < 15; tql++){for (int wql = 0; wql < jawabAlternatif1[tql].length; wql++){jawabAlternatif1[tql][wql].setEnabled(false);}}
    for (int wql = 0; wql < jawabAlternatif1[19].length; wql++){jawabAlternatif1[19][wql].setEnabled(false);}
    labelKriteria[0].setBounds(708,330,100,25); 
    labelKriteria[1].setBounds(708, 630, 100, 25);
    logOff.setVisible(false);
    update[0].setBounds(809,330,200,25);  
    awal.setVisible(true);
    update[1].setBounds(809,630,200,25);  
    kmbl[0].setBounds(506,300,251,25);  
    kmbl[1].setBounds(506,600,251,25);  
    kriteriaLanjut[0].setBounds(758,300,251,25);  
    kriteriaLanjut[1].setBounds(758,600,251,25);
    add(awal);
    for (int kul = 0; kul < 4; kul++) {  
        add(labelLuarKriteria[kul][0]);  
        labelLuarKriteria[kul][0].setVisible(false);  
        labelLuarKriteria1[kul][0].setVisible(false);  
        labelLuarKriteria[kul][1].setVisible(false);  
        labelLuarKriteria1[kul][1].setVisible(false);
        add(labelLuarKriteria1[kul][0]);
        add(labelLuarKriteria[kul][0]);  
        add(labelLuarKriteria1[kul][0]);
        add(labelLuarKriteria[kul][1]);  
        add(labelLuarKriteria1[kul][1]); }  
    for (int s = 0; s < 16; s++) {
        add(jawabKriteria1[s][0]);
        add(jawabKriteria1[s][1]); }  
    for (int mnjk = 0; mnjk < 100; mnjk++) {  
        add(jawabAlternatif1[mnjk][0]);  
        jawabAlternatif1[mnjk][0].setVisible(false);  
        add(jawabAlternatif1[mnjk][1]);  
        jawabAlternatif1[mnjk][1].setVisible(false); }  
        add(myocardInfarc);  
    for (int yulp = 0; yulp < 5; yulp++) {  
        add(labelLuarAlternatif[yulp][0]);  
        add(labelLuarAlternatif1[yulp][0]);  
        add(labelLuarAlternatif[yulp][1]);  
        add(labelLuarAlternatif1[yulp][1]);  
        labelLuarAlternatif[yulp][0].setVisible(false);  
        labelLuarAlternatif1[yulp][0].setVisible(false);  
        labelLuarAlternatif[yulp][1].setVisible(false);  
        labelLuarAlternatif1[yulp][1].setVisible(false); } 
    labelLuarKriteria[0][1].setBounds(0,450,100,25);  
    labelLuarKriteria[1][1].setBounds(0,480,100,25);  
    labelLuarKriteria[2][1].setBounds(0,510,100,25);  
    labelLuarKriteria[3][1].setBounds(0,540,100,25);  
    labelLuarKriteria1[0][1].setBounds(101,400,100,25);  
    labelLuarKriteria1[1][1].setBounds(202,400,100,25);  
    labelLuarKriteria1[2][1].setBounds(303,400,100,25);  
    labelLuarKriteria1[3][1].setBounds(404,400,100,25);  
    jawabKriteria1[0][1].setBounds(101,450,100,25);  
    jawabKriteria1[1][1].setBounds(101,480,100,25);  
    jawabKriteria1[2][1].setBounds(101,510,100,25);  
    jawabKriteria1[3][1].setBounds(101,540,100,25);  
    jawabKriteria1[4][1].setBounds(202,450,100,25);  
    jawabKriteria1[5][1].setBounds(202,480,100,25);  
    jawabKriteria1[6][1].setBounds(202,510,100,25);  
    jawabKriteria1[7][1].setBounds(202,540,100,25);  
    jawabKriteria1[8][1].setBounds(303,450,100,25);  
    jawabKriteria1[9][1].setBounds(303,480,100,25);  
    jawabKriteria1[10][1].setBounds(303,510,100,25);  
    jawabKriteria1[11][1].setBounds(303,540,100,25);  
    jawabKriteria1[12][1].setBounds(404,450,100,25);  
    jawabKriteria1[13][1].setBounds(404,480,100,25);  
    jawabKriteria1[14][1].setBounds(404,510,100,25);  
    jawabKriteria1[15][1].setBounds(404,540,100,25);  
    labelLuarAlternatif[0][1].setBounds(405,450,100,25);  
    labelLuarAlternatif[1][1].setBounds(405,480,100,25);  
    labelLuarAlternatif[2][1].setBounds(405,510,100,25);  
    labelLuarAlternatif[3][1].setBounds(405,540,100,25);  
    labelLuarAlternatif[4][1].setBounds(405,570,100,25);  
    labelLuarAlternatif1[0][1].setBounds(506,400,100,25);  
    labelLuarAlternatif1[1][1].setBounds(607,400,100,25);  
    labelLuarAlternatif1[2][1].setBounds(708,400,100,25);  
    labelLuarAlternatif1[3][1].setBounds(809,400,100,25);  
    labelLuarAlternatif1[4][1].setBounds(910,400,100,25);  
    jawabAlternatif1[0][1].setBounds(506,450,100,25);  
    jawabAlternatif1[1][1].setBounds(506,480,100,25);  
    jawabAlternatif1[2][1].setBounds(506,510,100,25);  
    jawabAlternatif1[3][1].setBounds(506,540,100,25);  
    jawabAlternatif1[4][1].setBounds(506,570,100,25);  
    jawabAlternatif1[5][1].setBounds(607,450,100,25);  
    jawabAlternatif1[6][1].setBounds(607,480,100,25);  
    jawabAlternatif1[7][1].setBounds(607,510,100,25);  
    jawabAlternatif1[8][1].setBounds(607,540,100,25);  
    jawabAlternatif1[9][1].setBounds(607,570,100,25);  
    jawabAlternatif1[10][1].setBounds(708,450,100,25);  
    jawabAlternatif1[11][1].setBounds(708,480,100,25);  
    jawabAlternatif1[12][1].setBounds(708,510,100,25);  
    jawabAlternatif1[13][1].setBounds(708,540,100,25);  
    jawabAlternatif1[14][1].setBounds(708,570,100,25);  
    jawabAlternatif1[15][1].setBounds(809,450,100,25);  
    jawabAlternatif1[16][1].setBounds(809,480,100,25);  
    jawabAlternatif1[17][1].setBounds(809,510,100,25);  
    jawabAlternatif1[18][1].setBounds(809,540,100,25);  
    jawabAlternatif1[19][1].setBounds(809,570,100,25);  
    jawabAlternatif1[20][1].setBounds(910,450,100,25);  
    jawabAlternatif1[21][1].setBounds(910,480,100,25);  
    jawabAlternatif1[22][1].setBounds(910,510,100,25);  
    jawabAlternatif1[23][1].setBounds(910,540,100,25);  
    jawabAlternatif1[24][1].setBounds(910,570,100,25);
    jawabAlternatif1[25][1].setBounds(506,450,100,25);  
    jawabAlternatif1[1 + 25][1].setBounds(506,480,100,25);  
    jawabAlternatif1[2 + 25][1].setBounds(506,510,100,25);  
    jawabAlternatif1[3 + 25][1].setBounds(506,540,100,25);  
    jawabAlternatif1[4 + 25][1].setBounds(506,570,100,25);  
    jawabAlternatif1[5 + 25][1].setBounds(607,450,100,25);  
    jawabAlternatif1[6 + 25][1].setBounds(607,480,100,25);  
    jawabAlternatif1[7 + 25][1].setBounds(607,510,100,25);  
    jawabAlternatif1[8 + 25][1].setBounds(607,540,100,25);  
    jawabAlternatif1[9 + 25][1].setBounds(607,570,100,25);  
    jawabAlternatif1[10 + 25][1].setBounds(708,450,100,25);  
    jawabAlternatif1[11 + 25][1].setBounds(708,480,100,25);  
    jawabAlternatif1[12 + 25][1].setBounds(708,510,100,25);  
    jawabAlternatif1[13 + 25][1].setBounds(708,540,100,25);  
    jawabAlternatif1[14 + 25][1].setBounds(708,570,100,25);  
    jawabAlternatif1[15 + 25][1].setBounds(809,450,100,25);  
    jawabAlternatif1[16 + 25][1].setBounds(809,480,100,25);  
    jawabAlternatif1[17 + 25][1].setBounds(809,510,100,25);  
    jawabAlternatif1[18 + 25][1].setBounds(809,540,100,25);  
    jawabAlternatif1[19 + 25][1].setBounds(809,570,100,25);  
    jawabAlternatif1[20 + 25][1].setBounds(910,450,100,25);  
    jawabAlternatif1[21 + 25][1].setBounds(910,480,100,25);  
    jawabAlternatif1[22 + 25][1].setBounds(910,510,100,25);  
    jawabAlternatif1[23 + 25][1].setBounds(910,540,100,25);  
    jawabAlternatif1[24 + 25][1].setBounds(910,570,100,25);
    jawabAlternatif1[0 + 50][1].setBounds(506,450,100,25);  
    jawabAlternatif1[1 + 50][1].setBounds(506,480,100,25);  
    jawabAlternatif1[2 + 50][1].setBounds(506,510,100,25);  
    jawabAlternatif1[3 + 50][1].setBounds(506,540,100,25);  
    jawabAlternatif1[4 + 50][1].setBounds(506,570,100,25);  
    jawabAlternatif1[5 + 50][1].setBounds(607,450,100,25);  
    jawabAlternatif1[6 + 50][1].setBounds(607,480,100,25);  
    jawabAlternatif1[7 + 50][1].setBounds(607,510,100,25);  
    jawabAlternatif1[8 + 50][1].setBounds(607,540,100,25);  
    jawabAlternatif1[9 + 50][1].setBounds(607,570,100,25);  
    jawabAlternatif1[10 + 50][1].setBounds(708,450,100,25);  
    jawabAlternatif1[11 + 50][1].setBounds(708,480,100,25);  
    jawabAlternatif1[12 + 50][1].setBounds(708,510,100,25);  
    jawabAlternatif1[13 + 50][1].setBounds(708,540,100,25);  
    jawabAlternatif1[14 + 50][1].setBounds(708,570,100,25);  
    jawabAlternatif1[15 + 50][1].setBounds(809,450,100,25);  
    jawabAlternatif1[16 + 50][1].setBounds(809,480,100,25);  
    jawabAlternatif1[17 + 50][1].setBounds(809,510,100,25);  
    jawabAlternatif1[18 + 50][1].setBounds(809,540,100,25);  
    jawabAlternatif1[19 + 50][1].setBounds(809,570,100,25);  
    jawabAlternatif1[20 + 50][1].setBounds(910,450,100,25);  
    jawabAlternatif1[21 + 50][1].setBounds(910,480,100,25);  
    jawabAlternatif1[22 + 50][1].setBounds(910,510,100,25);  
    jawabAlternatif1[23 + 50][1].setBounds(910,540,100,25);  
    jawabAlternatif1[24 + 50][1].setBounds(910,570,100,25);
    jawabAlternatif1[0 + 75][1].setBounds(506,450,100,25);  
    jawabAlternatif1[1 + 75][1].setBounds(506,480,100,25);  
    jawabAlternatif1[2 + 75][1].setBounds(506,510,100,25);  
    jawabAlternatif1[3 + 75][1].setBounds(506,540,100,25);  
    jawabAlternatif1[4 + 75][1].setBounds(506,570,100,25);  
    jawabAlternatif1[5 + 75][1].setBounds(607,450,100,25);  
    jawabAlternatif1[6 + 75][1].setBounds(607,480,100,25);  
    jawabAlternatif1[7 + 75][1].setBounds(607,510,100,25);  
    jawabAlternatif1[8 + 75][1].setBounds(607,540,100,25);  
    jawabAlternatif1[9 + 75][1].setBounds(607,570,100,25);  
    jawabAlternatif1[10 + 75][1].setBounds(708,450,100,25);  
    jawabAlternatif1[11 + 75][1].setBounds(708,480,100,25);  
    jawabAlternatif1[12 + 75][1].setBounds(708,510,100,25);  
    jawabAlternatif1[13 + 75][1].setBounds(708,540,100,25);  
    jawabAlternatif1[14 + 75][1].setBounds(708,570,100,25);  
    jawabAlternatif1[15 + 75][1].setBounds(809,450,100,25);  
    jawabAlternatif1[16 + 75][1].setBounds(809,480,100,25);  
    jawabAlternatif1[17 + 75][1].setBounds(809,510,100,25);  
    jawabAlternatif1[18 + 75][1].setBounds(809,540,100,25);  
    jawabAlternatif1[19 + 75][1].setBounds(809,570,100,25);  
    jawabAlternatif1[20 + 75][1].setBounds(910,450,100,25);  
    jawabAlternatif1[21 + 75][1].setBounds(910,480,100,25);  
    jawabAlternatif1[22 + 75][1].setBounds(910,510,100,25);  
    jawabAlternatif1[23 + 75][1].setBounds(910,540,100,25);  
    jawabAlternatif1[24 + 75][1].setBounds(910,570,100,25);
    lanjutlah[1].setBounds(404,570,100,25);  
    lanjutlah[0].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    c = 0;
                    lanjutPerhitunganA();}});  
    lanjutlah[1].addActionListener(new java.awt.event.ActionListener() {          
                @Override

  5. #5
    Tawi is offline Senior Member
    Join Date
    Feb 2013
    Posts
    118
    Rep Power
    0

    Default Re: Please help with my program

    Java Code:
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    c = 1;
                    lanjutPerhitunganA();}});  
    perhitunganKriteria[0].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    c = 0;
                    lanjutPerhitunganK();}});  
    perhitunganKriteria[1].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    c = 1;
                    lanjutPerhitunganK();}});  
    kriteriaLanjut[0].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    c = 0;
                    d = 0;
                    e = 0;
                    lanjutkanKriteria();}});  
    kmbl[0].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    c = 0;
                    pulang();}});  
    kmbl[1].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    c = 1;
                    pulang();}});
    awal.addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    setTitle("Program Pemilihan Obat dengan Cara Analytic Hierarchycal Process");  
                    setSize(1024,768);  
                    setVisible(true);  
                    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
                    setLocationRelativeTo(null); 
                     statusKoneksi.setVisible(true); 
                    statusMasuk.setVisible(true);
                    awal.setVisible(false);
                    lanjut.setVisible(true);
                    for (int lmo = 0; lmo < 4; lmo++) {  
                          for (int jmo = 0; jmo < 2; jmo++){
                              jawabKriteria[lmo][jmo].setEditable(true);
                              jawabKriteria[lmo][jmo].setVisible(true);
                              kriteria[lmo][jmo].setVisible(true); 
                              kriteria[lmo][jmo].setEnabled(true);}}  
                     for (int mlo = 0; mlo < 5; mlo++)  {
                         for (int hlok = 0; hlok < 2; hlok++) {
                              jawabAlternatif[mlo][hlok].setEditable(true);  
                              jawabAlternatif[mlo][hlok].setVisible(true);
                              alternatif[mlo][hlok].setVisible(true);
                              alternatif[mlo][hlok].setEnabled(true); }}
                    for (int klipa = 0; klipa < 2; klipa++) {
                        labelKriteria[klipa].setVisible(false);
                        lanjutlah[klipa].setVisible(false);
                        kmbl[klipa].setVisible(false);
                        update[klipa].setVisible(false);
                        perhitunganKriteria[klipa].setVisible(false);
                        kriteriaLanjut[klipa].setVisible(false);
                    }
                    lblNama.setVisible(true);  
                    txtNama.setVisible(true);  
                    kataSandi.setVisible(true);  
                    sandiKata.setVisible(true);  
                    masuk.setEnabled(false);
                    masuk.setVisible(true);  
                    keluar.setVisible(true);  
                    tombolHubungkankePadukData.setVisible(true);  
                    putuskanKoneksiKePadukData.setVisible(true);  
                    tombolUbahPadukData.setVisible(true);  
                    tombolBatal.setVisible(true); 
                    myocardialInfarction.setVisible(false);  
                    stroke.setVisible(false); 
                    for (int yul = 0; yul < 4; yul++) { 
                         labelLuarKriteria[yul][0].setVisible(false);  
                         labelLuarKriteria1[yul][0].setVisible(false);  
                         labelLuarKriteria[yul][1].setVisible(false);  
                         labelLuarKriteria1[yul][1].setVisible(false);}
                    for (int yulp = 0; yulp < 5; yulp++) {  
                        labelLuarAlternatif[yulp][0].setVisible(false);  
                        labelLuarAlternatif1[yulp][0].setVisible(false);  
                        labelLuarAlternatif[yulp][1].setVisible(false);  
                        labelLuarAlternatif1[yulp][1].setVisible(false); }
                    for (int hklma = 0; hklma < jawabKriteria1.length; hklma++) {for (int piano = 0; piano < 2; piano++) {jawabKriteria1[hklma][piano].setVisible(false); }}    
                    for (int hklma = 0; hklma < labelLuarKriteria.length; hklma++) {for (int nyola = 0; nyola < labelLuarKriteria[hklma].length; nyola++) {labelLuarKriteria[hklma][nyola].setVisible(false); }}  
                    for (int hklma = 0; hklma < labelLuarAlternatif.length; hklma++) {for (int nyola = 0; nyola < labelLuarAlternatif[hklma].length; nyola++) {labelLuarAlternatif[hklma][nyola].setVisible(false); }}  
                    for (int hklma = 0; hklma < labelLuarAlternatif1.length; hklma++) {for (int nyola = 0; nyola < labelLuarAlternatif1[hklma].length; nyola++) {labelLuarAlternatif1[hklma][nyola].setVisible(false); }}  
                    for (int hklm = 0; hklm < labelLuarKriteria1.length; hklm++) {for (int nyol = 0; nyol < labelLuarKriteria1[hklm].length; nyol++) {labelLuarKriteria1[hklm][nyol].setVisible(false); }}  
                    for (int celta = 0; celta < lblPerhitunganKriteria.length; celta++) {lblPerhitunganKriteria[celta].setVisible(false); } 
                    for (int mnjka = 0; mnjka < jawabAlternatif1.length; mnjka++) {for (int unt = 0; unt < jawabAlternatif1[mnjka].length; unt++) {jawabAlternatif1[mnjka][unt].setVisible(false); }}
                    for (int mnjka = 0; mnjka < 25; mnjka++) {jawabAlternatif1[mnjka][0].setEditable(false); }
                    for (int mnjka = 0; mnjka < 25; mnjka++) {jawabAlternatif1[mnjka][1].setEditable(false); }
                    logOff.setVisible(false);
                    for (int hklma = 0; hklma < kriteria.length; hklma++) {for (int kloaka = 0; kloaka < 2; kloaka++){kriteria[hklma][kloaka].setVisible(true); }}  
                    for (int hklma = 0; hklma < alternatif.length; hklma++) {for (int kock = 0; kock <2; kock++) {alternatif[hklma][kock].setVisible(true);}}     
                     }});  
    logOff.addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    statusKoneksi.setVisible(true);  
                    statusMasuk.setText("Belum Masuk");
                    statusMasuk.setVisible(true);
                    for (int yul = 0; yul < 4; yul++) { 
                         labelLuarKriteria[yul][0].setVisible(false);  
                         labelLuarKriteria1[yul][0].setVisible(false);  
                         labelLuarKriteria[yul][1].setVisible(false);  
                         labelLuarKriteria1[yul][1].setVisible(false);}
                    for (int yulp = 0; yulp < 5; yulp++) {  
                        labelLuarAlternatif[yulp][0].setVisible(false);  
                        labelLuarAlternatif1[yulp][0].setVisible(false);  
                        labelLuarAlternatif[yulp][1].setVisible(false);  
                        labelLuarAlternatif1[yulp][1].setVisible(false); } 
                    for (int klio = 0; klio < 1; klio++) {labelKriteria[klio].setVisible(false);}
                    lblNama.setVisible(true);  
                    txtNama.setVisible(true);
                    txtNama.setText("");
                    kataSandi.setVisible(true);  
                    sandiKata.setVisible(true);
                    sandiKata.setText("");
                    masuk.setEnabled(true);
                    masuk.setVisible(true);  
                    keluar.setVisible(true);  
                    tombolHubungkankePadukData.setVisible(true);  
                    putuskanKoneksiKePadukData.setVisible(true);  
                    tombolUbahPadukData.setVisible(true);  
                    tombolBatal.setVisible(true); 
                    tombolHubungkankePadukData.setEnabled(false);  
                    putuskanKoneksiKePadukData.setEnabled(false);  
                    tombolUbahPadukData.setEnabled(false);  
                    tombolBatal.setEnabled(false); 
                    lanjut.setVisible(false);
                    logOff.setVisible(false);
                    awal.setVisible(false);
                try {
                    connection.close();
                    connection = null;
                    statement.close();
                    pernyataan.close();
                } catch (SQLException ex) {ex.printStackTrace();}               
                    statusKoneksi.setText("Koneksi ke Paduk Data sudah Terputus");
                    myocardialInfarction.setVisible(false);  
                    stroke.setVisible(false);
                    for (int lmo = 0; lmo < 4; lmo++) {  
                          for (int jmo = 0; jmo < 2; jmo++){
                              jawabKriteria[lmo][jmo].setEditable(false);
                              jawabKriteria[lmo][jmo].setVisible(false);
                              kriteria[lmo][jmo].setVisible(false); 
                              kriteria[lmo][jmo].setEnabled(false);}}  
                     for (int mlo = 0; mlo < 5; mlo++)  {
                         for (int hlok = 0; hlok < 2; hlok++) {
                              jawabAlternatif[mlo][hlok].setEditable(false);  
                              jawabAlternatif[mlo][hlok].setVisible(false);
                              alternatif[mlo][hlok].setVisible(false);
                              alternatif[mlo][hlok].setEnabled(false); }}
                    for (int hklma = 0; hklma < jawabKriteria1.length; hklma++) {for (int piano = 0; piano < 2; piano++) {jawabKriteria1[hklma][piano].setVisible(false); }}    
                    for (int hklma = 0; hklma < labelLuarKriteria.length; hklma++) {for (int nyola = 0; nyola < labelLuarKriteria[hklma].length; nyola++) {labelLuarKriteria[hklma][nyola].setVisible(false); }}  
                    for (int hklma = 0; hklma < labelLuarAlternatif.length; hklma++) {for (int nyola = 0; nyola < labelLuarAlternatif[hklma].length; nyola++) {labelLuarAlternatif[hklma][nyola].setVisible(false); }}  
                    for (int hklma = 0; hklma < labelLuarAlternatif1.length; hklma++) {for (int nyola = 0; nyola < labelLuarAlternatif1[hklma].length; nyola++) {labelLuarAlternatif1[hklma][nyola].setVisible(false); }}  
                    for (int hklm = 0; hklm < labelLuarKriteria1.length; hklm++) {for (int nyol = 0; nyol < labelLuarKriteria1[hklm].length; nyol++) {labelLuarKriteria1[hklm][nyol].setVisible(false); }}  
                    for (int celta = 0; celta < lblPerhitunganKriteria.length; celta++) {lblPerhitunganKriteria[celta].setVisible(false); } 
                    for (int mnjka = 0; mnjka < 25; mnjka++) {jawabAlternatif1[mnjka][0].setVisible(false); }
                    for (int mnjka = 0; mnjka < 25; mnjka++) {jawabAlternatif1[mnjka][0].setEditable(false); }
                    for (int mnjka = 0; mnjka < 25; mnjka++) {jawabAlternatif1[mnjka][1].setVisible(false); }
                    for (int mnjka = 0; mnjka < 25; mnjka++) {jawabAlternatif1[mnjka][1].setEditable(false); }
                    for (int top = 0; top < 2; top++){
                        labelKriteria[top].setVisible(false);
                        lanjutlah[top].setVisible(false);
                        kriteriaLanjut[top].setVisible(false);
                        update[top].setVisible(false);
                        kmbl[top].setVisible(false);
                        perhitunganKriteria[top].setVisible(false);}}});  
    prosesAlternatifInkonsisten[0].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    for (int jkl = 0; jkl < 25; jkl++){ 
                        variabelTampung[jkl][c] = String.valueOf(jawabAlternatif1[jkl][c]);    
                    }
                    perhitunganAHPA1();
                    do {
                            for(int jtk = 0; jtk < 25; jtk++) {
                                variabelTampung[jtk][e] = String.valueOf(MHPAT[jtk][e]);
                            }
                        perhitunganAHPA1();
                        }
                    while (DHNAT[0][e] > 0.001 || DHNAT[1][e] > 0.001 || DHNAT[2][e] > 0.001 || DHNAT[3][d] > 0.001 || DHNAT[4][e] > 0.001);
                    attributA1();
                    if (CRA[0][c] > 0.1) {
                            alternatifKriteria1TdkKonsisten();
                        }
                        else if (CRA[0][c] < 0.1) {
                            if (CRA[3][c] > 0.1) {
                                alternatifKriteria4TdkKonsisten();
                            }
                            else if (CRA[3][c] < 0.1){
                                if (CRA[2][c] > 0.1) {
                                    alternatifKriteria3TdkKonsisten();
                                }
                                else if (CRA[2][c] < 0.1) {
                                    if (CRA[1][c] > 0.1) {
                                        alternatifKriteria3TdkKonsisten();
                                    }
                                    else if (CRA[1][c] < 0.1) {
                                        if (CRK[0][c] > 0.1) {
                                            kriteriaTdkKonsisten();
                                        }
                                        else if (CRK[0][c] < 0.1) {
                                            kriteriaInkonsisten.setVisible(false);
                                            alternatifKriteria1.setVisible(false);
                                            alternatifKriteria2.setVisible(false);
                                            alternatifKriteria3.setVisible(false);
                                            alternatifKriteria4.setVisible(false);
                                            hitFinal();
                                            JOptionPane.showMessageDialog(null, "Semuanya sudah Konsisten", "Sukses", JOptionPane.INFORMATION_MESSAGE);
                                   }
                      
                               }
                            }   
                    }
                }
                }});
    prosesAlternatifInkonsisten[1].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    for (int jkl = 0 + 25; jkl < 25 + 25; jkl++){ 
                        variabelTampung[jkl][c] = String.valueOf(jawabAlternatif1[jkl][c]);    
                    }
                    perhitunganAHPA2();
                    do {
                            for(int jtk = 0 + 25; jtk < 25 + 25; jtk++) {
                                variabelTampung[jtk][e] = String.valueOf(MHPAT[jtk][e]);
                            }
                        perhitunganAHPA2();
                        }
                    while (DHNAT[0][e] > 0.001 || DHNAT[1][e] > 0.001 || DHNAT[2][e] > 0.001 || DHNAT[3][d] > 0.001 || DHNAT[4][e] > 0.001);
                    attributA2();
                    if (CRA[1][c] > 0.1) {
                        alternatifKriteria2TdkKonsisten();
                    }
                    else if (CRA[1][c] < 0.1){
                        if (CRA[0][c] > 0.1) {
                            alternatifKriteria1TdkKonsisten();
                        }
                        else if (CRA[0][c] < 0.1) {
                            if (CRA[3][c] > 0.1) {
                                alternatifKriteria4TdkKonsisten();
                            }
                            else if (CRA[3][c] < 0.1){
                                if (CRA[2][c] > 0.1) {
                                    alternatifKriteria3TdkKonsisten();
                                }
                                else if (CRA[2][c] < 0.1) {
                                    if (CRK[0][c] > 0.1) {
                                        kriteriaTdkKonsisten();
                                    }
                                    else if (CRK[0][c] < 0.1) {
                                        kriteriaInkonsisten.setVisible(false);
                                        alternatifKriteria1.setVisible(false);
                                        alternatifKriteria2.setVisible(false);
                                        alternatifKriteria3.setVisible(false);
                                        alternatifKriteria4.setVisible(false);
                                        hitFinal();
                                        JOptionPane.showMessageDialog(null, "Semuanya sudah Konsisten", "Sukses", JOptionPane.INFORMATION_MESSAGE);
                                   }
                      
                               }
                            }   
                    }
                }
                }});
    prosesAlternatifInkonsisten[2].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    for (int jkl = 0 + 50; jkl < 25 + 50; jkl++){ 
                        variabelTampung[jkl][c] = String.valueOf(jawabAlternatif1[jkl][c]);    
                    }
                    perhitunganAHPA3();
                    do {
                            for(int jtk = 0 + 50; jtk < 25 + 50; jtk++) {
                                variabelTampung[jtk][e] = String.valueOf(MHPAT[jtk][e]);
                            }
                        perhitunganAHPA3();
                        }
                    while (DHNAT[0][e] > 0.001 || DHNAT[1][e] > 0.001 || DHNAT[2][e] > 0.001 || DHNAT[3][d] > 0.001 || DHNAT[4][e] > 0.001);
                    attributA3();
                    if (CRA[2][c] > 0.1) {
                            alternatifKriteria3TdkKonsisten();
                        }
                        else if (CRA[2][c] < 0.1) {
                            if (CRA[1][c] > 0.1) {
                                alternatifKriteria2TdkKonsisten();
                            }
                            else if (CRA[1][c] < 0.1){
                               if (CRA[0][c] > 0.1) {
                                   alternatifKriteria1TdkKonsisten();
                               }
                               else if (CRA[0][c] < 0.1) {
                                   if (CRA[3][c] > 0.1) {
                                       alternatifKriteria4TdkKonsisten();
                                   }
                                   else if (CRA[3][c] < 0){
                                   if (CRK[0][c] > 0.1) {
                                       kriteriaTdkKonsisten();
                                   }
                                   else if (CRK[0][c] < 0.1) {
                                       kriteriaInkonsisten.setVisible(false);
                                       alternatifKriteria1.setVisible(false);
                                       alternatifKriteria2.setVisible(false);
                                       alternatifKriteria3.setVisible(false);
                                       alternatifKriteria4.setVisible(false);
                                       hitFinal();
                                       JOptionPane.showMessageDialog(null, "Semuanya sudah Konsisten", "Sukses", JOptionPane.INFORMATION_MESSAGE);
                                   }
                      
                               }
                            }   
                    }
                }
                }});
    prosesAlternatifInkonsisten[3].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    for (int jkl = 0 + 75; jkl < 25 + 75; jkl++){ 
                        variabelTampung[jkl][c] = String.valueOf(jawabAlternatif1[jkl][c]);    
                    }
                    perhitunganAHPA4();
                    do {
                            for(int jtk = 0 + 75; jtk < 25 + 75; jtk++) {
                                variabelTampung[jtk][e] = String.valueOf(MHPAT[jtk][e]);
                            }
                        perhitunganAHPA4();
                        }
                    while (DHNAT[0][e] > 0.001 || DHNAT[1][e] > 0.001 || DHNAT[2][e] > 0.001 || DHNAT[3][d] > 0.001 || DHNAT[4][e] > 0.001);
                    attributA4();
                    if (CRA[3][c] > 0.1) {
                        alternatifKriteria4TdkKonsisten();
                    }
                    else if (CRA[3][c] < 0.1) {
                        if (CRA[2][c] > 0.1) {
                            alternatifKriteria3TdkKonsisten();
                        }
                        else if (CRA[2][c] < 0.1) {
                            if (CRA[1][c] > 0.1) {
                                alternatifKriteria2TdkKonsisten();
                            }
                            else if (CRA[1][c] < 0.1){
                               if (CRA[0][c] > 0.1) {
                                   alternatifKriteria1TdkKonsisten();
                               }
                               else if (CRA[0][c] < 0.1) {
                                   if (CRK[0][c] > 0.1) {
                                       kriteriaTdkKonsisten();
                                   }
                                   else if (CRK[0][c] < 0.1) {
                                       kriteriaInkonsisten.setVisible(false);
                                       alternatifKriteria1.setVisible(false);
                                       alternatifKriteria2.setVisible(false);
                                       alternatifKriteria3.setVisible(false);
                                       alternatifKriteria4.setVisible(false);
                                       hitFinal();
                                       JOptionPane.showMessageDialog(null, "Semuanya sudah Konsisten", "Sukses", JOptionPane.INFORMATION_MESSAGE);
                                   }
                      
                               }
                            }   
                    }
                }}});
    prosesKriteriaInkonsisten[0].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    for (int jkl = 0; jkl < 16; jkl++){ 
                        variabelTampungK[jkl][c] = String.valueOf(jawabKriteria1[jkl][c]);    
                    }
                    perhitunganAHPK();
                    do {
                            for(int jtk = 0; jtk < 16; jtk++) {
                                variabelTampungK[jtk][c] = String.valueOf(MHPKT[jtk][c]);
                            }
                        perhitunganAHPK();
                        }
                    while (DHNKT[0][c] > 0.001 || DHNKT[1][c] > 0.001 || DHNKT[2][c] > 0.001 || DHNKT[3][c] > 0.001);
                    attributK();
                    if (CRK[0][c] > 0.1) {
                        kriteriaTdkKonsisten();
                    }
                    else if (CRK[0][c] < 0.1) {
                        if (CRA[0][c] > 0.1) {
                            alternatifKriteria1TdkKonsisten();
                        }
                        else if (CRA[0][c] < 0.1) {
                            if (CRA[1][c] > 0.1) {
                                alternatifKriteria2TdkKonsisten();
                            }
                            else if (CRA[1][c] < 0.1){
                                if (CRA[2][c] > 0.1) {
                                    alternatifKriteria3TdkKonsisten();
                                }
                                else if (CRA[2][c] < 0.1) {
                                    if (CRA[3][c] > 0.1){
                                        alternatifKriteria4TdkKonsisten();
                                    }
                                    else if (CRA[3][c] < 0.1) {
                                        kriteriaInkonsisten.setVisible(false);
                                        alternatifKriteria1.setVisible(false);
                                        alternatifKriteria2.setVisible(false);
                                        alternatifKriteria3.setVisible(false);
                                        alternatifKriteria4.setVisible(false);
                                        hitFinal();
                                        JOptionPane.showMessageDialog(null, "Semuanya sudah Konsisten", "Sukses", JOptionPane.INFORMATION_MESSAGE);
                                    }
                                }
                            }
                        }
                    }
                }
            });
    kriteriaTidakKonsistenSebelumnya[0].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    if (CRA[0][c] > 0.1) {
                            alternatifKriteria1TdkKonsisten();
                        }
                        else if (CRA[0][c] < 0.1) {
                            if (CRA[1][c] > 0.1) {
                                alternatifKriteria2TdkKonsisten();
                            }
                            else if (CRA[1][c] < 0.1){
                                if (CRA[2][c] > 0.1) {
                                    alternatifKriteria3TdkKonsisten();
                                }
                                else if (CRA[2][c] < 0.1) {
                                    if (CRA[3][c] > 0.1){
                                        alternatifKriteria4TdkKonsisten();
                                    }
                                    else if (CRA[3][c] < 0.1) {
                                        kriteriaInkonsisten.setVisible(false);
                                        alternatifKriteria1.setVisible(false);
                                        alternatifKriteria2.setVisible(false);
                                        alternatifKriteria3.setVisible(false);
                                        alternatifKriteria4.setVisible(false);
                                        hitFinal();
                                        JOptionPane.showMessageDialog(null, "Semuanya sudah Konsisten", "Sukses", JOptionPane.INFORMATION_MESSAGE);
                                    }
                                }
                            }
                        }
                    }}); 
    alternatifTidakKonsistenSebelumnya[0].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    if (CRA[3][c] > 0.1) {
                        alternatifKriteria4TdkKonsisten();
                    }
                    else if (CRA[3][c] < 0.1) {
                        if (CRA[2][c] > 0.1) {
                            alternatifKriteria3TdkKonsisten();
                        }
                        else if (CRA[2][c] < 0.1) {
                            if (CRA[1][c] > 0.1) {
                                alternatifKriteria2TdkKonsisten();
                            }
                            else if (CRA[1][c] < 0.1){
                               if (CRA[0][c] > 0.1) {
                                   alternatifKriteria1TdkKonsisten();
                               }
                               else if (CRA[0][c] < 0.1) {
                                   if (CRK[0][c] > 0.1) {
                                       kriteriaTdkKonsisten();
                                   }
                                   else if (CRK[0][c] < 0.1) {
                                       kriteriaInkonsisten.setVisible(false);
                                       alternatifKriteria1.setVisible(false);
                                       alternatifKriteria2.setVisible(false);
                                       alternatifKriteria3.setVisible(false);
                                       alternatifKriteria4.setVisible(false);
                                       hitFinal();
                                       JOptionPane.showMessageDialog(null, "Semuanya sudah Konsisten", "Sukses", JOptionPane.INFORMATION_MESSAGE);
                                   }
                      
                               }
                            }   
                    }
                }}});
    alternatifTidakKonsistenSebelumnya[1].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    if (CRA[0][c] > 0.1) {
                            alternatifKriteria1TdkKonsisten();
                        }
                        else if (CRA[0][c] < 0.1) {
                            if (CRA[3][c] > 0.1) {
                                alternatifKriteria4TdkKonsisten();
                            }
                            else if (CRA[3][c] < 0.1){
                                if (CRA[2][c] > 0.1) {
                                    alternatifKriteria3TdkKonsisten();
                                }
                                else if (CRA[2][c] < 0.1) {
                                    if (CRK[0][c] > 0.1) {

  6. #6
    Tawi is offline Senior Member
    Join Date
    Feb 2013
    Posts
    118
    Rep Power
    0

    Default Re: Please help with my program

    Java Code:
                                        kriteriaTdkKonsisten();
                                    }
                                    else if (CRK[0][c] < 0.1) {
                                        kriteriaInkonsisten.setVisible(false);
                                        alternatifKriteria1.setVisible(false);
                                        alternatifKriteria2.setVisible(false);
                                        alternatifKriteria3.setVisible(false);
                                        alternatifKriteria4.setVisible(false);
                                        hitFinal();
                                        JOptionPane.showMessageDialog(null, "Semuanya sudah Konsisten", "Sukses", JOptionPane.INFORMATION_MESSAGE);
                                    }
                                }
                            }
                        }
                }
    });
    alternatifTidakKonsistenSebelumnya[2].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    if (CRA[1][c] > 0.1) {
                        alternatifKriteria2TdkKonsisten();
                    }
                    else if (CRA[1][c] < 0.1){
                        if (CRA[0][c] > 0.1) {
                            alternatifKriteria1TdkKonsisten();
                        }
                        else if (CRA[0][c] < 0.1) {
                            if (CRA[3][c] > 0.1) {
                                alternatifKriteria4TdkKonsisten();
                            }
                            else if (CRA[3][c] < 0.1){
                                if (CRA[2][c] > 0.1) {
                                    alternatifKriteria3TdkKonsisten();
                                }
                                else if (CRA[2][c] < 0.1) {
                                    if (CRK[0][c] > 0.1) {
                                        kriteriaTdkKonsisten();
                                    }
                                    else if (CRK[0][c] < 0.1) {
                                        kriteriaInkonsisten.setVisible(false);
                                        alternatifKriteria1.setVisible(false);
                                        alternatifKriteria2.setVisible(false);
                                        alternatifKriteria3.setVisible(false);
                                        alternatifKriteria4.setVisible(false);
                                        hitFinal();
                                        JOptionPane.showMessageDialog(null, "Semuanya sudah Konsisten", "Sukses", JOptionPane.INFORMATION_MESSAGE);
                                   }
                      
                               }
                            }   
                    }
                    }
                }
    });
    alternatifTidakKonsistenSebelumnya[3].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    if (CRA[2][c] > 0.1) {
                            alternatifKriteria3TdkKonsisten();
                        }
                        else if (CRA[2][c] < 0.1) {
                            if (CRA[1][c] > 0.1) {
                                alternatifKriteria2TdkKonsisten();
                            }
                            else if (CRA[1][c] < 0.1){
                               if (CRA[0][c] > 0.1) {
                                   alternatifKriteria1TdkKonsisten();
                               }
                               else if (CRA[0][c] < 0.1) {
                                   if (CRA[3][c] > 0.1) {
                                       alternatifKriteria4TdkKonsisten();
                                   }
                                   else if (CRA[3][c] < 0){
                                   if (CRK[0][c] > 0.1) {
                                       kriteriaTdkKonsisten();
                                   }
                                   else if (CRK[0][c] < 0.1) {
                                       kriteriaInkonsisten.setVisible(false);
                                       alternatifKriteria1.setVisible(false);
                                       alternatifKriteria2.setVisible(false);
                                       alternatifKriteria3.setVisible(false);
                                       alternatifKriteria4.setVisible(false);
                                       hitFinal();
                                       JOptionPane.showMessageDialog(null, "Semuanya sudah Konsisten", "Sukses", JOptionPane.INFORMATION_MESSAGE);
                                   }
                      
                               }
                            }   
                    }
                }
                }
    });
    kriteriaLanjut[1].addActionListener(new java.awt.event.ActionListener() {          
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {   
                    c = 1;
                    d = 1;
                    e = 1;
                    lanjutkanKriteria();}});   }
     public void attributK(){
                   for (int vlop = 0; vlop < 4; vlop++){
                        nilaiEigenK[vlop][c] = bobotKriteria[vlop][c]/HJBK1T[vlop][c];
                   }
                   for (int vlop = 0; vlop < 4; vlop++){
                        bobotKriteria[vlop][c] = HJBK1T[vlop][c]/4;
                   }
                   lamdaKriteria[0][c] = (nilaiEigenK[0][c] + nilaiEigenK[1][c] + nilaiEigenK[2][c] + nilaiEigenK[3][c]) /4;
                   CIK[0][c] = (lamdaKriteria[0][c] - 4)/(4 - 1);
                   CRK[0][c] = (CIK[0][c]/0.90);
            }
    public void pulang(){
        if (xyz[c] >= 0) {
           if (xyz[c] == 3) {
              if ("".equals(kriteriaLanjut[c].getText())) {
                  labelKriteria[c].setText(lblKriteria[xyz[c]][c]);
                  kmbl[c].setText(lblKriteria[xyz[c] - 1][c]);
                  kriteriaLanjut[c].setEnabled(true);
                  kriteriaLanjut[c].setText("Proses");
                  for (int hji = 75; hji < jawabAlternatif1.length; hji++){
                  jawabAlternatif1[hji][c].setEnabled(true);}
              }
              else if ("Proses".equals(kriteriaLanjut[c].getText())){
              xyzisi3();
              xyz[c]--;
              tindakProses();          
           }}
        else if ((xyz[c] > 0) && (xyz[c] < 3)) {                          
           if (xyz[c] == 2){
               xyzisi2();
               xyz[c]--;  
               tindakProses();}
           else if (xyz[c] == 1){
               xyzisi1();
               xyz[c]--;
               labelKriteria[c].setText(lblKriteria[xyz[c]][c]);
              kriteriaLanjut[c].setText(lblKriteria[xyz[c] + 1][c]); 
              kriteriaLanjut[c].setEnabled(true);
              kmbl[c].setText("");
              kmbl[c].setEnabled(false);                                                
              JOptionPane.showMessageDialog(null, "Awal Kriteria", "Pesan Kesalahan", JOptionPane.INFORMATION_MESSAGE);
              }}
        else if ((xyz[c] > 3 ) || (xyz[c] < 0)) {  
           JOptionPane.showMessageDialog(null, "Ada Kesalahan tidak Terduga", "Pesan Kesalahan", JOptionPane.INFORMATION_MESSAGE);  }}
    }
    public void tindakProses(){
           labelKriteria[c].setText(lblKriteria[xyz[c]][c]);
           kriteriaLanjut[c].setText(lblKriteria[xyz[c] + 1][c]); 
           kmbl[c].setText(lblKriteria[xyz[c] - 1][c]);
    }
    public void attributA1(){
        for (int vlopa = 0; vlopa < 5; vlopa++){
         nilaiEigenA[vlopa][c] = bobotAlternatif[vlopa][c]/HJBA1T[vlopa][c];}
        for (int vlopa = 0; vlopa < 5; vlopa++){
         bobotAlternatif[vlopa][c] = HJBA1T[vlopa][c]/5;}
        lamdaAlternatif[0][c] = (nilaiEigenA[0][c] + nilaiEigenA[1][c] + nilaiEigenA[2][c] + nilaiEigenA[3][c] + nilaiEigenA[4][c]) /5;
        CIA[0][c] = (lamdaAlternatif[0][c] -5)/(5 - 1);
        CRA[0][c] = (CIA[0][c]/1.12);
    }
    public void attributA2(){
        for (int vlopa = 0 + 5; vlopa < 5 + 5; vlopa++){
         nilaiEigenA[vlopa][c] = bobotAlternatif[vlopa][c]/HJBA1T[vlopa][c];}
        for (int vlopa = 0 + 5; vlopa < 5 + 5; vlopa++){
         bobotAlternatif[vlopa][c] = HJBA1T[vlopa][c]/5;}
        lamdaAlternatif[1][c] = (nilaiEigenA[0 + 5][c] + nilaiEigenA[1 + 5][c] + nilaiEigenA[2 + 5][c] + nilaiEigenA[3 + 5][c] + nilaiEigenA[4 + 5][c]) /5;
        CIA[1][c] = (lamdaAlternatif[1][c] -5)/(5 - 1);
        CRA[1][c] = (CIA[1][c]/1.12);
    }
    public void attributA3(){
        for (int vlopa = 0 + 10; vlopa < 5 + 10; vlopa++){
         nilaiEigenA[vlopa][c] = bobotAlternatif[vlopa][c]/HJBA1T[vlopa][c];}
        for (int vlopa = 0 + 10; vlopa < 5 + 10; vlopa++){
         bobotAlternatif[vlopa][c] = HJBA1T[vlopa][c]/5;}
        lamdaAlternatif[2][c] = (nilaiEigenA[0 + 10][c] + nilaiEigenA[1 + 10][c] + nilaiEigenA[2 + 10][c] + nilaiEigenA[3 + 10][c] + nilaiEigenA[4 + 10][c]) /5;
        CIA[2][c] = (lamdaAlternatif[2][c] -5)/(5 - 1);
        CRA[2][c] = (CIA[2][c]/1.12);
    }
    public void attributA4(){
        for (int vlopa = 0 + 15; vlopa < 5 + 15; vlopa++){
         nilaiEigenA[vlopa][c] = bobotAlternatif[vlopa][c]/HJBA1T[vlopa][c];}
        for (int vlopa = 0 + 15; vlopa < 5 + 15; vlopa++){
         bobotAlternatif[vlopa][c] = HJBA1T[vlopa][c]/5;}
        lamdaAlternatif[3][c] = (nilaiEigenA[0 + 15][c] + nilaiEigenA[1 + 15][c] + nilaiEigenA[2 + 15][c] + nilaiEigenA[3 + 15][c] + nilaiEigenA[4 + 15][c]) /5;
        CIA[3][c] = (lamdaAlternatif[3][c] -5)/(5 - 1);
        CRA[3][c] = (CIA[3][c]/1.12);
    }
    public void xyzisi0(){
        for (int dlpl = 25; dlpl < 100; dlpl++) {
            jawabAlternatif1[dlpl][c].setEnabled(false);
            jawabAlternatif1[dlpl][c].setVisible(false);}
        for (int klul = 0; klul < 25; klul = klul + 6) {
            jawabAlternatif1[klul][c].setEnabled(false);
            jawabAlternatif1[klul][c].setText("1"); 
            jawabAlternatif1[klul][c].setVisible(true);}
        for (int mnjkaf = 1; mnjkaf < 5; mnjkaf++) {
            jawabAlternatif1[mnjkaf + (xyz[c]*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkaf + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjkaf + (xyz[c]*25)][c].setVisible(true); }
        for (int mnjkap = 7; mnjkap < 10; mnjkap++) {
            jawabAlternatif1[mnjkap + (xyz[c]*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkap + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjkap + (xyz[c]*25)][c].setVisible(true); }
        for (int mnjkal = 13; mnjkal < 15; mnjkal++) {
            jawabAlternatif1[mnjkal + (xyz[c]*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkal + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjkal + (xyz[c]*25)][c].setVisible(true); }
            jawabAlternatif1[19 + (xyz[c]*25)][c].setEnabled(false);
            jawabAlternatif1[19 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[19 + (xyz[c]*25)][c].setVisible(true); 
        for (int mnjkan = 20; mnjkan < 24; mnjkan++) {
            jawabAlternatif1[mnjkan + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjkan + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjkan + (xyz[c]*25)][c].setVisible(true);}
        for (int mnjkam = 15; mnjkam < 18; mnjkam++) {
            jawabAlternatif1[mnjkam + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjkam + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjkam + (xyz[c]*25)][c].setVisible(true);}
        for (int mnjkaj = 10; mnjkaj < 12; mnjkaj++) {
            jawabAlternatif1[mnjkaj + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjkaj + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjkaj + (xyz[c]*25)][c].setVisible(true);}
            jawabAlternatif1[5 + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[5 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[5 + (xyz[c]*25)][c].setVisible(true);        
    }
    public void xyzisi1(){
        for (int klum = 25; klum < 50; klum = klum + 6) {
            jawabAlternatif1[klum][c].setEnabled(false);
            jawabAlternatif1[klum][c].setText("1"); 
            jawabAlternatif1[klum][c].setVisible(true);}
        for (int mnjkajk = 1; mnjkajk < 5; mnjkajk++) {
            jawabAlternatif1[mnjkajk + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkajk + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[mnjkajk + ((xyz[c])*25)][c].setVisible(true); 
            jawabAlternatif1[mnjkajk + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkajk + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjkajk + ((xyz[c] + 1)*25)][c].setVisible(false); 
            jawabAlternatif1[mnjkajk + ((xyz[c] + 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkajk + ((xyz[c] + 2)*25)][c].setText("");
            jawabAlternatif1[mnjkajk + ((xyz[c] + 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjkajk + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkajk + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjkajk + ((xyz[c] - 1)*25)][c].setVisible(false);}
        for (int mnjkakj = 7; mnjkakj < 10; mnjkakj++) {
            jawabAlternatif1[mnjkakj + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkakj + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[mnjkakj + ((xyz[c])*25)][c].setVisible(true);
            jawabAlternatif1[mnjkakj + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkakj + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjkakj + ((xyz[c] + 1)*25)][c].setVisible(false); 
            jawabAlternatif1[mnjkakj + ((xyz[c] + 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkakj + ((xyz[c] + 2)*25)][c].setText("");
            jawabAlternatif1[mnjkakj + ((xyz[c] + 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjkakj + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkakj + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjkakj + ((xyz[c] - 1)*25)][c].setVisible(false);}
        for (int mnjka1 = 13; mnjka1 < 15; mnjka1++) {
            jawabAlternatif1[mnjka1 + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka1 + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[mnjka1 + ((xyz[c])*25)][c].setVisible(true);
            jawabAlternatif1[mnjka1 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka1 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjka1 + ((xyz[c] + 1)*25)][c].setVisible(false); 
            jawabAlternatif1[mnjka1 + ((xyz[c] + 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka1 + ((xyz[c] + 2)*25)][c].setText("");
            jawabAlternatif1[mnjka1 + ((xyz[c] + 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka1 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka1 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka1 + ((xyz[c] - 1)*25)][c].setVisible(false);}
            jawabAlternatif1[19 + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c])*25)][c].setVisible(true);
            jawabAlternatif1[19 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c] + 1)*25)][c].setVisible(false); 
            jawabAlternatif1[19 + ((xyz[c] + 2)*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c] + 2)*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c] + 2)*25)][c].setVisible(false);
            jawabAlternatif1[19 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c] - 1)*25)][c].setVisible(false);
        for (int mnjka2 = 20; mnjka2 < 24; mnjka2++) {
            jawabAlternatif1[mnjka2 + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjka2 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjka2 + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[mnjka2 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka2 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjka2 + ((xyz[c] + 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka2 + ((xyz[c] + 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka2 + ((xyz[c] + 2)*25)][c].setText("");
            jawabAlternatif1[mnjka2 + ((xyz[c] + 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka2 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka2 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka2 + ((xyz[c] - 1)*25)][c].setVisible(false);}
        for (int mnjka3 = 15; mnjka3 < 18; mnjka3++) {
            jawabAlternatif1[mnjka3 + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjka3 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjka3 + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[mnjka3 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka3 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjka3 + ((xyz[c] + 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka3 + ((xyz[c] + 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka3 + ((xyz[c] + 2)*25)][c].setText("");
            jawabAlternatif1[mnjka3 + ((xyz[c] + 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka3 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka3 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka3 + ((xyz[c] - 1)*25)][c].setVisible(false); }
        for (int mnjka4 = 10; mnjka4 < 12; mnjka4++) {
            jawabAlternatif1[mnjka4 + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjka4 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjka4 + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[mnjka4 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka4 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjka4 + ((xyz[c] + 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka4 + ((xyz[c] + 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka4 + ((xyz[c] + 2)*25)][c].setText("");
            jawabAlternatif1[mnjka4 + ((xyz[c] + 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka4 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka4 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka4 + ((xyz[c] - 1)*25)][c].setVisible(false); }
            jawabAlternatif1[5 + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[5 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[5 + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[5 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[5 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[5 + ((xyz[c] + 1)*25)][c].setVisible(false);
            jawabAlternatif1[5 + ((xyz[c] + 2)*25)][c].setEnabled(false);
            jawabAlternatif1[5 + ((xyz[c] + 2)*25)][c].setText("");
            jawabAlternatif1[5 + ((xyz[c] + 2)*25)][c].setVisible(false);
            jawabAlternatif1[5 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[5 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[5 + ((xyz[c] - 1)*25)][c].setVisible(false);
    }
    public void posisiKriteria(){
        jawabKriteria1[0][0].setBounds(101,155,100,25);  
        jawabKriteria1[1][0].setBounds(101,185,100,25);  
        jawabKriteria1[2][0].setBounds(101,215,100,25);  
        jawabKriteria1[3][0].setBounds(101,245,100,25);  
        jawabKriteria1[4][0].setBounds(202,155,100,25);  
        jawabKriteria1[5][0].setBounds(202,185,100,25);  
        jawabKriteria1[6][0].setBounds(202,215,100,25);  
        jawabKriteria1[7][0].setBounds(202,245,100,25);  
        jawabKriteria1[8][0].setBounds(303,155,100,25);  
        jawabKriteria1[9][0].setBounds(303,185,100,25);  
        jawabKriteria1[10][0].setBounds(303,215,100,25);  
        jawabKriteria1[11][0].setBounds(303,245,100,25);  
        jawabKriteria1[12][0].setBounds(404,155,100,25);  
        jawabKriteria1[13][0].setBounds(404,185,100,25);  
        jawabKriteria1[14][0].setBounds(404,215,100,25);  
        jawabKriteria1[15][0].setBounds(404,245,100,25);
        jawabKriteria1[0][1].setBounds(101,450,100,25);  
        jawabKriteria1[1][1].setBounds(101,480,100,25);  
        jawabKriteria1[2][1].setBounds(101,510,100,25);  
        jawabKriteria1[3][1].setBounds(101,540,100,25);  
        jawabKriteria1[4][1].setBounds(202,450,100,25);  
        jawabKriteria1[5][1].setBounds(202,480,100,25);  
        jawabKriteria1[6][1].setBounds(202,510,100,25);  
        jawabKriteria1[7][1].setBounds(202,540,100,25);  
        jawabKriteria1[8][1].setBounds(303,450,100,25);  
        jawabKriteria1[9][1].setBounds(303,480,100,25);  
        jawabKriteria1[10][1].setBounds(303,510,100,25);  
        jawabKriteria1[11][1].setBounds(303,540,100,25);  
        jawabKriteria1[12][1].setBounds(404,450,100,25);  
        jawabKriteria1[13][1].setBounds(404,480,100,25);  
        jawabKriteria1[14][1].setBounds(404,510,100,25);  
        jawabKriteria1[15][1].setBounds(404,540,100,25); 
    }
    public void xyzisi2() {
        for (int kluf = 50; kluf < 75; kluf = kluf + 6) {
            jawabAlternatif1[kluf][c].setEnabled(false);
            jawabAlternatif1[kluf][c].setText("1"); 
            jawabAlternatif1[kluf][c].setVisible(true);}
        for (int mnjkas = 1; mnjkas < 5; mnjkas++) {
            jawabAlternatif1[mnjkas + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkas + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjkas + ((xyz[c] + 1)*25)][c].setVisible(false); 
            jawabAlternatif1[mnjkas + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkas + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[mnjkas + ((xyz[c])*25)][c].setVisible(true); 
            jawabAlternatif1[mnjkas + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkas + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjkas + ((xyz[c] - 1)*25)][c].setVisible(false); 
            jawabAlternatif1[mnjkas + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjkas + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjkas + ((xyz[c] - 2)*25)][c].setVisible(false); }
        for (int mnjka5 = 7; mnjka5 < 10; mnjka5++) {
            jawabAlternatif1[mnjka5 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka5 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjka5 + ((xyz[c] + 1)*25)][c].setVisible(false); 
            jawabAlternatif1[mnjka5 + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka5 + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[mnjka5 + ((xyz[c])*25)][c].setVisible(true); 
            jawabAlternatif1[mnjka5 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka5 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka5 + ((xyz[c] - 1)*25)][c].setVisible(false); 
            jawabAlternatif1[mnjka5 + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka5 + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka5 + ((xyz[c] - 2)*25)][c].setVisible(false);}
        for (int mnjka6 = 13; mnjka6 < 15; mnjka6++) {
            jawabAlternatif1[mnjka6 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka6 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjka6 + ((xyz[c] + 1)*25)][c].setVisible(false); 
            jawabAlternatif1[mnjka6 + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka6 + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[mnjka6 + ((xyz[c])*25)][c].setVisible(true); 
            jawabAlternatif1[mnjka6 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka6 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka6 + ((xyz[c] - 1)*25)][c].setVisible(false); 
            jawabAlternatif1[mnjka6 + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka6 + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka6 + ((xyz[c] - 2)*25)][c].setVisible(false);}
            jawabAlternatif1[19 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c] + 1)*25)][c].setVisible(false); 
            jawabAlternatif1[19 + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c])*25)][c].setVisible(true); 
            jawabAlternatif1[19 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c] - 1)*25)][c].setVisible(false); 
            jawabAlternatif1[19 + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c] - 2)*25)][c].setVisible(false);
        for (int mnjka7 = 20; mnjka7 < 24; mnjka7++) {
            jawabAlternatif1[mnjka7 + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjka7 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjka7 + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[mnjka7 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka7 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjka7 + ((xyz[c] + 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka7 + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka7 + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka7 + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka7 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka7 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka7 + ((xyz[c] - 1)*25)][c].setVisible(false);}
        for (int mnjka8 = 15; mnjka8 < 18; mnjka8++) {
            jawabAlternatif1[mnjka8 + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjka8 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjka8 + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[mnjka8 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka8 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjka8 + ((xyz[c] + 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka8 + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka8 + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka8 + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka8 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka8 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka8 + ((xyz[c] - 1)*25)][c].setVisible(false); }
        for (int mnjka9 = 10; mnjka9 < 12; mnjka9++) {
            jawabAlternatif1[mnjka9 + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjka9 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjka9 + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[mnjka9 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka9 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[mnjka9 + ((xyz[c] + 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka9 + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka9 + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka9 + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka9 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka9 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka9 + ((xyz[c] - 1)*25)][c].setVisible(false); }
            jawabAlternatif1[5 + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[5 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[5 + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[5 + ((xyz[c] + 1)*25)][c].setEnabled(false);
            jawabAlternatif1[5 + ((xyz[c] + 1)*25)][c].setText("");
            jawabAlternatif1[5 + ((xyz[c] + 1)*25)][c].setVisible(false);
            jawabAlternatif1[5 + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[5 + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[5 + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[5 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[5 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[5 + ((xyz[c] - 1)*25)][c].setVisible(false);
    }
    public void xyzisi3(){
        for (int klu = 75; klu < 100; klu = klu + 6) {
            jawabAlternatif1[klu][c].setEnabled(false);
            jawabAlternatif1[klu][c].setText("1"); 
            jawabAlternatif1[klu][c].setVisible(true);}
        for (int mnjka = 1; mnjka < 5; mnjka++) {
            jawabAlternatif1[mnjka + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c])*25)][c].setVisible(true);
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setVisible(false);}
        for (int mnjka = 7; mnjka < 10; mnjka++) {
            jawabAlternatif1[mnjka + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c])*25)][c].setVisible(true); 
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setEnabled(false);

  7. #7
    Tawi is offline Senior Member
    Join Date
    Feb 2013
    Posts
    118
    Rep Power
    0

    Default Re: Please help with my program

    Java Code:
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setVisible(false);}
        for (int mnjka = 13; mnjka < 15; mnjka++) {
            jawabAlternatif1[mnjka + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c])*25)][c].setVisible(true); 
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setVisible(false);}
            jawabAlternatif1[19 + ((xyz[c])*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c])*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c])*25)][c].setVisible(true); 
            jawabAlternatif1[19 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c] - 1)*25)][c].setVisible(false);
            jawabAlternatif1[19 + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[19 + ((xyz[c] - 3)*25)][c].setEnabled(false);
            jawabAlternatif1[19 + ((xyz[c] - 3)*25)][c].setText("");
            jawabAlternatif1[19 + ((xyz[c] - 3)*25)][c].setVisible(false);
            for (int mnjka = 20; mnjka < 24; mnjka++) {
            jawabAlternatif1[mnjka + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjka + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjka + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setVisible(false);}
        for (int mnjka = 15; mnjka < 18; mnjka++) {
            jawabAlternatif1[mnjka + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjka + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjka + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setVisible(false); }
        for (int mnjka = 10; mnjka < 12; mnjka++) {
            jawabAlternatif1[mnjka + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[mnjka + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[mnjka + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 1)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setEnabled(false);
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setText("");
            jawabAlternatif1[mnjka + ((xyz[c] - 3)*25)][c].setVisible(false);
            jawabAlternatif1[5 + (xyz[c]*25)][c].setEnabled(true);
            jawabAlternatif1[5 + (xyz[c]*25)][c].setText("");
            jawabAlternatif1[5 + (xyz[c]*25)][c].setVisible(true);
            jawabAlternatif1[5 + ((xyz[c] - 1)*25)][c].setEnabled(false);
            jawabAlternatif1[5 + ((xyz[c] - 1)*25)][c].setText("");
            jawabAlternatif1[5 + ((xyz[c] - 1)*25)][c].setVisible(false);
            jawabAlternatif1[5 + ((xyz[c] - 2)*25)][c].setEnabled(false);
            jawabAlternatif1[5 + ((xyz[c] - 2)*25)][c].setText("");
            jawabAlternatif1[5 + ((xyz[c] - 2)*25)][c].setVisible(false);
            jawabAlternatif1[5 + ((xyz[c] - 3)*25)][c].setEnabled(false);
            jawabAlternatif1[5 + ((xyz[c] - 3)*25)][c].setText("");
            jawabAlternatif1[5 + ((xyz[c] - 3)*25)][c].setVisible(false);}
    }
    public void lanjutkanKriteria(){
                    if (xyz[c] <= 3) {
                        if (xyz[c] == 0) {
                            xyzisi0(); 
                            kmbl[c].setEnabled(true);
                            xyz[c]++;
                            labelKriteria[c].setText(lblKriteria[xyz[c]][c]);
                            kriteriaLanjut[c].setText(lblKriteria[xyz[c] + 1][c]);
                            kmbl[c].setText(lblKriteria[xyz[c] - 1][c]);
                        }
                    else if ((xyz[c] > 0) && (xyz[c] < 3)) {
                        if (xyz[c] == 1) {xyzisi1();}
                        else if (xyz[c] == 2) {xyzisi2();}
                        xyz[c]++;
                        kmbl[c].setText(lblKriteria[xyz[c] - 1][c]);
                        if ((xyz[c] + 1) <= 3) {
                            kriteriaLanjut[c].setText(lblKriteria[xyz[c] + 1][c]);
                            labelKriteria[c].setText(lblKriteria[xyz[c]][c]);
                        }
                        else if ((xyz[c] + 1) > 3) {
                            kriteriaLanjut[c].setText("Proses");
                            labelKriteria[c].setText(lblKriteria[xyz[c]][c]);
                        }
                    } 
                    else if (xyz[c] == 3) {
                        xyzisi3();
                        kriteriaLanjut[c].setText("");
                        kriteriaLanjut[c].setEnabled(false);
                        kmbl[c].setText(lblKriteria[xyz[c]][c]);
                        labelKriteria[c].setText("");
                        for (int tyu = 75; tyu <jawabAlternatif.length; tyu++){
                        jawabAlternatif1[tyu][c].setEnabled(false);}
                        long start = System.currentTimeMillis();
                        perhitunganAHP();  
                        long elapsed = System.currentTimeMillis() - start;
                        JOptionPane.showMessageDialog(null, "Part three took: " + elapsed, "Pesan Informasi", JOptionPane.INFORMATION_MESSAGE); 
                        do {
                            for(int jtk = 0; jtk < 16; jtk++) {
                                variabelTampungK[jtk][d] = String.valueOf(MHPKT[jtk][d]);
                            }
                        perhitunganAHPK();
                        }
                        while (DHNKT[0][d] > 0.001 || DHNKT[1][d] > 0.001 || DHNKT[2][d] > 0.001 || DHNKT[3][d] > 0.001);                       
                        do {
                            for(int jtk = 0; jtk < 25; jtk++) {
                                variabelTampung[jtk][e] = String.valueOf(MHPAT[jtk][e]);
                            }
                        perhitunganAHPA1();
                        }
                        while (DHNAT[0][e] > 0.001 || DHNAT[1][e] > 0.001 || DHNAT[2][e] > 0.001 || DHNAT[3][d] > 0.001 || DHNAT[4][e] > 0.001);
                        do {
                            for(int jtk = 0 + 25; jtk < 25 + 25; jtk++) {
                                variabelTampung[jtk][e] = String.valueOf(MHPAT[jtk][e]);
                            }
                        perhitunganAHPA2();
                        }
                        while (DHNAT[0 + 5][e] > 0.001 || DHNAT[1 + 5][e] > 0.001 || DHNAT[2 + 5][e] > 0.001 || DHNAT[3 + 5][d] > 0.001 || DHNAT[4 + 5][e] > 0.001);
                        do {
                            for(int jtk = 0 + 50; jtk < 25 + 50; jtk++) {
                                variabelTampung[jtk][e] = String.valueOf(MHPAT[jtk][e]);
                            }
                        perhitunganAHPA3();
                        }
                        while (DHNAT[0 + 10][e] > 0.001 || DHNAT[1 + 10][e] > 0.001 || DHNAT[2 + 10][e] > 0.001 || DHNAT[3 + 10][d] > 0.001 || DHNAT[4 + 10][e] > 0.001);
                        do {
                            for(int jtk = 0 + 75; jtk < 25 + 75; jtk++) {
                                variabelTampung[jtk][e] = String.valueOf(MHPAT[jtk][e]);
                            }
                        perhitunganAHPA4();
                        }
                        while (DHNAT[0 + 15][e] > 0.001 || DHNAT[1 + 15][e] > 0.001 || DHNAT[2 + 15][e] > 0.001 || DHNAT[3 + 15][d] > 0.001 || DHNAT[4 + 15][e] > 0.001);
                        hitFinal();
                        JOptionPane.showMessageDialog(null, "Akhir Kriteria", "Pesan Kesalahan", JOptionPane.INFORMATION_MESSAGE);}
                    else if ((xyz[c] > 3) || (xyz[c] < 0)) {
                        JOptionPane.showMessageDialog(null, "Ada Kesalahan tidak Terduga", "Pesan Kesalahan", JOptionPane.INFORMATION_MESSAGE); 
                        xyz[c]--;}}
    }
    public void hitFinal(){
        perhitunganFinal();
        hitungBobotK();
        hitungBobotA();
        nilaiEigenK();
        nilaiEigenA();
        hitLamdaKriteria();
        hitLamdaAlternatif();
        hitKonsistensiIndeksK();
        hitKonsistensiIndeksA();
        hitKonsistensiRatioK();
        hitKonsistensiRatioA();
        consistency();
    }
    public void kriteriaTdkKonsisten(){
        kriteriaInkonsisten.setTitle("Perbandingan Kriteria tidak Konsisten");
        kriteriaInkonsisten.setVisible(true);
        kriteriaInkonsisten.setSize(768, 640);
        kriteriaInkonsisten.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        kriteriaInkonsisten.setLocationRelativeTo(null);
        for (int kul = 0; kul < 4; kul++) {  
        kriteriaInkonsisten.add(labelLuarKriteria1[kul][c]);  
        labelLuarKriteria1[kul][c].setVisible(true);} 
        for (int tql = 1; tql < 4; tql++){
             jawabKriteria1[tql][c].setEnabled(false);
             jawabKriteria1[tql][c].setVisible(true);}
        for (int tql = 6; tql < 8; tql++){
             jawabKriteria1[tql][c].setEnabled(false);
             jawabKriteria1[tql][c].setVisible(true);}
             jawabKriteria1[11][c].setEnabled(false);
             jawabKriteria1[11][c].setVisible(true);     
        for (int hklma = 12; hklma < 15; hklma++) {
             jawabKriteria1[hklma][c].setVisible(true); 
             jawabKriteria1[hklma][c].setText("");
             jawabKriteria1[hklma][c].setEnabled(true);}
        for (int hklma = 8; hklma < 10; hklma++) {
             jawabKriteria1[hklma][c].setText("");
             jawabKriteria1[hklma][c].setEnabled(true);
             jawabKriteria1[hklma][c].setVisible(true);}
             jawabKriteria1[4][c].setVisible(true); 
             jawabKriteria1[4][c].setText("");
             jawabKriteria1[4][c].setEnabled(true); 
            jawabKriteria1[0][c].setEnabled(false);
            jawabKriteria1[0][c].setVisible(true);
            jawabKriteria1[0][c].setText("1");
            jawabKriteria1[5][c].setEnabled(false);
            jawabKriteria1[5][c].setVisible(true);
            jawabKriteria1[5][c].setText("1");
            jawabKriteria1[10][c].setEnabled(false);
            jawabKriteria1[10][c].setVisible(true);
            jawabKriteria1[10][c].setText("1");
            jawabKriteria1[15][c].setEnabled(false);
            jawabKriteria1[15][c].setVisible(true);
            jawabKriteria1[15][c].setText("1"); 
        jawabKriteria1[0][0].setBounds(20,155,100,25);  
        jawabKriteria1[1][0].setBounds(20,185,100,25);  
        jawabKriteria1[2][0].setBounds(20,215,100,25);  
        jawabKriteria1[3][0].setBounds(20,245,100,25);  
        jawabKriteria1[4][0].setBounds(121,155,100,25);  
        jawabKriteria1[5][0].setBounds(121,185,100,25);  
        jawabKriteria1[6][0].setBounds(121,215,100,25);  
        jawabKriteria1[7][0].setBounds(121,245,100,25);  
        jawabKriteria1[8][0].setBounds(222,155,100,25);  
        jawabKriteria1[9][0].setBounds(222,185,100,25);  
        jawabKriteria1[10][0].setBounds(222,215,100,25);  
        jawabKriteria1[11][0].setBounds(222,245,100,25);  
        jawabKriteria1[12][0].setBounds(323,155,100,25);  
        jawabKriteria1[13][0].setBounds(323,185,100,25);  
        jawabKriteria1[14][0].setBounds(323,215,100,25);  
        jawabKriteria1[15][0].setBounds(323,245,100,25);
        jawabKriteria1[0][1].setBounds(20,450,100,25);  
        jawabKriteria1[1][1].setBounds(20,480,100,25);  
        jawabKriteria1[2][1].setBounds(20,510,100,25);  
        jawabKriteria1[3][1].setBounds(20,540,100,25);  
        jawabKriteria1[4][1].setBounds(121,450,100,25);  
        jawabKriteria1[5][1].setBounds(121,480,100,25);  
        jawabKriteria1[6][1].setBounds(121,510,100,25);  
        jawabKriteria1[7][1].setBounds(121,540,100,25);  
        jawabKriteria1[8][1].setBounds(222,450,100,25);  
        jawabKriteria1[9][1].setBounds(222,480,100,25);  
        jawabKriteria1[10][1].setBounds(222,510,100,25);  
        jawabKriteria1[11][1].setBounds(222,540,100,25);  
        jawabKriteria1[12][1].setBounds(323,450,100,25);  
        jawabKriteria1[13][1].setBounds(323,480,100,25);  
        jawabKriteria1[14][1].setBounds(323,510,100,25);  
        jawabKriteria1[15][1].setBounds(323,540,100,25);
        prosesKriteriaInkonsisten[0].setBounds(323,600,100,25);
        kriteriaTidakKonsistenSebelumnya[0].setBounds(20,600,100,25);
        prosesKriteriaInkonsisten[0].setVisible(true);
        kriteriaTidakKonsistenSebelumnya[0].setVisible(true);
        for (int mkli = 0; mkli < 16; mkli++) {        
            kriteriaInkonsisten.add(jawabKriteria1[mkli][c]);}
        kriteriaInkonsisten.add(prosesKriteriaInkonsisten[0]);
        kriteriaInkonsisten.add(kriteriaTidakKonsistenSebelumnya[0]);
        kriteriaTidakKonsistenSebelumnya[0].setVisible(true);
        prosesKriteriaInkonsisten[0].setVisible(true);
    }
    public void posisiLabelAlternatif(){
        labelLuarAlternatif[0][0].setBounds(0,150,100,25);  
        labelLuarAlternatif[1][0].setBounds(0,180,100,25);  
        labelLuarAlternatif[2][0].setBounds(0,210,100,25);  
        labelLuarAlternatif[3][0].setBounds(0,240,100,25);  
        labelLuarAlternatif[4][0].setBounds(0,270,100,25);  
        labelLuarAlternatif1[0][0].setBounds(101,100,100,25);  
        labelLuarAlternatif1[1][0].setBounds(202,100,100,25);  
        labelLuarAlternatif1[2][0].setBounds(303,100,100,25);  
        labelLuarAlternatif1[3][0].setBounds(404,100,100,25);  
        labelLuarAlternatif1[4][0].setBounds(505,100,100,25); 
        labelLuarAlternatif[0][1].setBounds(0,450,100,25);  
        labelLuarAlternatif[1][1].setBounds(0,480,100,25);  
        labelLuarAlternatif[2][1].setBounds(0,510,100,25);  
        labelLuarAlternatif[3][1].setBounds(0,540,100,25);  
        labelLuarAlternatif[4][1].setBounds(0,570,100,25);  
        labelLuarAlternatif1[0][1].setBounds(101,400,100,25);  
        labelLuarAlternatif1[1][1].setBounds(202,400,100,25);  
        labelLuarAlternatif1[2][1].setBounds(303,400,100,25);  
        labelLuarAlternatif1[3][1].setBounds(404,400,100,25);  
        labelLuarAlternatif1[4][1].setBounds(505,400,100,25); 
        for (int yulp = 0; yulp < labelLuarAlternatif.length; yulp++){
        labelLuarAlternatif[yulp][c].setVisible(true); }
    }
    public void alternatifKriteria1TdkKonsisten(){
        alternatifKriteria1.setTitle(lblKriteria[0][c]);
        alternatifKriteria1.setVisible(true);
        alternatifKriteria1.setSize(768, 640);
        alternatifKriteria1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        alternatifKriteria1.setLocationRelativeTo(null);
        posisiLabelAlternatif();
        jawabAlternatif1[0][0].setBounds(101, 150, 100, 25);  
        jawabAlternatif1[1][0].setBounds(101, 180, 100, 25);  
        jawabAlternatif1[2][0].setBounds(101, 210, 100, 25);  
        jawabAlternatif1[3][0].setBounds(101, 240, 100, 25);  
        jawabAlternatif1[4][0].setBounds(101, 270, 100, 25);  
        jawabAlternatif1[5][0].setBounds(202, 150, 100, 25);  
        jawabAlternatif1[6][0].setBounds(202, 180, 100, 25);  
        jawabAlternatif1[7][0].setBounds(202, 210, 100, 25);  
        jawabAlternatif1[8][0].setBounds(202, 240, 100, 25);  
        jawabAlternatif1[9][0].setBounds(202, 270, 100, 25);  
        jawabAlternatif1[10][0].setBounds(303, 150, 100, 25);  
        jawabAlternatif1[11][0].setBounds(303, 180, 100, 25);  
        jawabAlternatif1[12][0].setBounds(303, 210, 100, 25);  
        jawabAlternatif1[13][0].setBounds(303, 240, 100, 25);  
        jawabAlternatif1[14][0].setBounds(303, 270, 100, 25);  
        jawabAlternatif1[15][0].setBounds(404, 150, 100, 25);  
        jawabAlternatif1[16][0].setBounds(404, 180, 100, 25);  
        jawabAlternatif1[17][0].setBounds(404, 210, 100, 25);  
        jawabAlternatif1[18][0].setBounds(404, 240, 100, 25);  
        jawabAlternatif1[19][0].setBounds(404, 270, 100, 25);  
        jawabAlternatif1[20][0].setBounds(505, 150, 100, 25);  
        jawabAlternatif1[21][0].setBounds(505, 180, 100, 25);  
        jawabAlternatif1[22][0].setBounds(505, 210, 100, 25);  
        jawabAlternatif1[23][0].setBounds(505, 240, 100, 25);  
        jawabAlternatif1[24][0].setBounds(505, 270, 100, 25); 
        jawabAlternatif1[0][1].setBounds(101, 450, 100, 25);  
        jawabAlternatif1[1][1].setBounds(101, 480, 100, 25);  
        jawabAlternatif1[2][1].setBounds(101, 510, 100, 25);  
        jawabAlternatif1[3][1].setBounds(101, 540, 100, 25);  
        jawabAlternatif1[4][1].setBounds(101, 570, 100, 25);  
        jawabAlternatif1[5][1].setBounds(202, 450, 100, 25);  
        jawabAlternatif1[6][1].setBounds(202, 480, 100, 25);  
        jawabAlternatif1[7][1].setBounds(202, 510, 100, 25);  
        jawabAlternatif1[8][1].setBounds(202, 540, 100, 25);  
        jawabAlternatif1[9][1].setBounds(202, 570, 100, 25);  
        jawabAlternatif1[10][1].setBounds(303, 450, 100, 25);  
        jawabAlternatif1[11][1].setBounds(303, 480, 100, 25);  
        jawabAlternatif1[12][1].setBounds(303, 510, 100, 25);  
        jawabAlternatif1[13][1].setBounds(303, 540, 100, 25);  
        jawabAlternatif1[14][1].setBounds(303, 570, 100, 25);  
        jawabAlternatif1[15][1].setBounds(404, 450, 100, 25);  
        jawabAlternatif1[16][1].setBounds(404, 480, 100, 25);  
        jawabAlternatif1[17][1].setBounds(404, 510, 100, 25);  
        jawabAlternatif1[18][1].setBounds(404, 540, 100, 25);  
        jawabAlternatif1[19][1].setBounds(404, 570, 100, 25);  
        jawabAlternatif1[20][1].setBounds(505, 450, 100, 25);  
        jawabAlternatif1[21][1].setBounds(505, 480, 100, 25);  
        jawabAlternatif1[22][1].setBounds(505, 510, 100, 25);  
        jawabAlternatif1[23][1].setBounds(505, 540, 100, 25);  
        jawabAlternatif1[24][1].setBounds(505, 570, 100, 25);
        prosesAlternatifInkonsisten[0].setBounds(505, 600, 100, 25);
        alternatifTidakKonsistenSebelumnya[0].setBounds(0, 600, 100, 25);
        xyzisi0();
        for (int mkli = 0; mkli < 25; mkli++) {        
            alternatifKriteria1.add(jawabAlternatif1[mkli][c]);}
        for (int yulp = 0; yulp < labelLuarAlternatif.length; yulp++){
        alternatifKriteria1.add(labelLuarAlternatif[yulp][c]); }
        alternatifKriteria1.add(prosesAlternatifInkonsisten[0]);
        alternatifKriteria1.add(alternatifTidakKonsistenSebelumnya[0]);
        alternatifTidakKonsistenSebelumnya[0].setVisible(true);
        prosesAlternatifInkonsisten[0].setVisible(true);
    }
    public void alternatifKriteria2TdkKonsisten(){
        alternatifKriteria2.setTitle(lblKriteria[1][c]);
        alternatifKriteria2.setVisible(true);
        alternatifKriteria2.setSize(768, 640);
        alternatifKriteria2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        alternatifKriteria2.setLocationRelativeTo(null);
        posisiLabelAlternatif();
        jawabAlternatif1[0 + 25][0].setBounds(101, 150, 100, 25);  
        jawabAlternatif1[1 + 25][0].setBounds(101, 180, 100, 25);  
        jawabAlternatif1[2 + 25][0].setBounds(101, 210, 100, 25);  
        jawabAlternatif1[3 + 25][0].setBounds(101, 240, 100, 25);  
        jawabAlternatif1[4 + 25][0].setBounds(101, 270, 100, 25);  
        jawabAlternatif1[5 + 25][0].setBounds(202, 150, 100, 25);  
        jawabAlternatif1[6 + 25][0].setBounds(202, 180, 100, 25);  
        jawabAlternatif1[7 + 25][0].setBounds(202, 210, 100, 25);  
        jawabAlternatif1[8 + 25][0].setBounds(202, 240, 100, 25);  
        jawabAlternatif1[9 + 25][0].setBounds(202, 270, 100, 25);  
        jawabAlternatif1[10 + 25][0].setBounds(303, 150, 100, 25);  
        jawabAlternatif1[11 + 25][0].setBounds(303, 180, 100, 25);  
        jawabAlternatif1[12 + 25][0].setBounds(303, 210, 100, 25);  
        jawabAlternatif1[13 + 25][0].setBounds(303, 240, 100, 25);  
        jawabAlternatif1[14 + 25][0].setBounds(303, 270, 100, 25);  
        jawabAlternatif1[15 + 25][0].setBounds(404, 150, 100, 25);  
        jawabAlternatif1[16 + 25][0].setBounds(404, 180, 100, 25);  
        jawabAlternatif1[17 + 25][0].setBounds(404, 210, 100, 25);  
        jawabAlternatif1[18 + 25][0].setBounds(404, 240, 100, 25);  
        jawabAlternatif1[19 + 25][0].setBounds(404, 270, 100, 25);  
        jawabAlternatif1[20 + 25][0].setBounds(505, 150, 100, 25);  
        jawabAlternatif1[21 + 25][0].setBounds(505, 180, 100, 25);  
        jawabAlternatif1[22 + 25][0].setBounds(505, 210, 100, 25);  
        jawabAlternatif1[23 + 25][0].setBounds(505, 240, 100, 25);  
        jawabAlternatif1[24 + 25][0].setBounds(505, 270, 100, 25); 
        jawabAlternatif1[0 + 25][1].setBounds(101, 450, 100, 25);  
        jawabAlternatif1[1 + 25][1].setBounds(101, 480, 100, 25);  
        jawabAlternatif1[2 + 25][1].setBounds(101, 510, 100, 25);  
        jawabAlternatif1[3 + 25][1].setBounds(101, 540, 100, 25);  
        jawabAlternatif1[4 + 25][1].setBounds(101, 570, 100, 25);  
        jawabAlternatif1[5 + 25][1].setBounds(202, 450, 100, 25);  
        jawabAlternatif1[6 + 25][1].setBounds(202, 480, 100, 25);  
        jawabAlternatif1[7 + 25][1].setBounds(202, 510, 100, 25);  
        jawabAlternatif1[8 + 25][1].setBounds(202, 540, 100, 25);  
        jawabAlternatif1[9 + 25][1].setBounds(202, 570, 100, 25);  
        jawabAlternatif1[10 + 25][1].setBounds(303, 450, 100, 25);  
        jawabAlternatif1[11 + 25][1].setBounds(303, 480, 100, 25);  
        jawabAlternatif1[12 + 25][1].setBounds(303, 510, 100, 25);  
        jawabAlternatif1[13 + 25][1].setBounds(303, 540, 100, 25);  
        jawabAlternatif1[14 + 25][1].setBounds(303, 570, 100, 25);  
        jawabAlternatif1[15 + 25][1].setBounds(404, 450, 100, 25);  
        jawabAlternatif1[16 + 25][1].setBounds(404, 480, 100, 25);  
        jawabAlternatif1[17 + 25][1].setBounds(404, 510, 100, 25);  
        jawabAlternatif1[18 + 25][1].setBounds(404, 540, 100, 25);  
        jawabAlternatif1[19 + 25][1].setBounds(404, 570, 100, 25);  
        jawabAlternatif1[20 + 25][1].setBounds(505, 450, 100, 25);  
        jawabAlternatif1[21 + 25][1].setBounds(505, 480, 100, 25);  
        jawabAlternatif1[22 + 25][1].setBounds(505, 510, 100, 25);  
        jawabAlternatif1[23 + 25][1].setBounds(505, 540, 100, 25);  
        jawabAlternatif1[24 + 25][1].setBounds(505, 570, 100, 25);
        prosesAlternatifInkonsisten[1].setBounds(505, 600, 100, 25);
        alternatifTidakKonsistenSebelumnya[1].setBounds(0, 600, 100, 25);
        xyzisi1();
        for (int mkli = 0 + 25; mkli < 25 + 25; mkli++) {        
            alternatifKriteria2.add(jawabAlternatif1[mkli][c]);}
        for (int yulp = 0; yulp < labelLuarAlternatif.length; yulp++){
        alternatifKriteria2.add(labelLuarAlternatif[yulp][c]); }
        alternatifKriteria2.add(prosesAlternatifInkonsisten[1]);
        alternatifKriteria2.add(alternatifTidakKonsistenSebelumnya[1]);
        alternatifTidakKonsistenSebelumnya[1].setVisible(true);
        prosesAlternatifInkonsisten[1].setVisible(true);
    }
    public void alternatifKriteria3TdkKonsisten(){
        alternatifKriteria3.setTitle(lblKriteria[2][c]);
        alternatifKriteria3.setVisible(true);
        alternatifKriteria3.setSize(768, 640);
        alternatifKriteria3.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        alternatifKriteria3.setLocationRelativeTo(null);
        posisiLabelAlternatif();
        jawabAlternatif1[0 + 50][0].setBounds(101, 150, 100, 25);  
        jawabAlternatif1[1 + 50][0].setBounds(101, 180, 100, 25);  
        jawabAlternatif1[2 + 50][0].setBounds(101, 210, 100, 25);  
        jawabAlternatif1[3 + 50][0].setBounds(101, 240, 100, 25);  
        jawabAlternatif1[4 + 50][0].setBounds(101, 270, 100, 25);  
        jawabAlternatif1[5 + 50][0].setBounds(202, 150, 100, 25);  
        jawabAlternatif1[6 + 50][0].setBounds(202, 180, 100, 25);  
        jawabAlternatif1[7 + 50][0].setBounds(202, 210, 100, 25);  
        jawabAlternatif1[8 + 50][0].setBounds(202, 240, 100, 25);  
        jawabAlternatif1[9 + 50][0].setBounds(202, 270, 100, 25);  
        jawabAlternatif1[10 + 50][0].setBounds(303, 150, 100, 25);  
        jawabAlternatif1[11 + 50][0].setBounds(303, 180, 100, 25);  
        jawabAlternatif1[12 + 50][0].setBounds(303, 210, 100, 25);  
        jawabAlternatif1[13 + 50][0].setBounds(303, 240, 100, 25);  
        jawabAlternatif1[14 + 50][0].setBounds(303, 270, 100, 25);  
        jawabAlternatif1[15 + 50][0].setBounds(404, 150, 100, 25);  
        jawabAlternatif1[16 + 50][0].setBounds(404, 180, 100, 25);  
        jawabAlternatif1[17 + 50][0].setBounds(404, 210, 100, 25);  
        jawabAlternatif1[18 + 50][0].setBounds(404, 240, 100, 25);  
        jawabAlternatif1[19 + 50][0].setBounds(404, 270, 100, 25);  
        jawabAlternatif1[20 + 50][0].setBounds(505, 150, 100, 25);  
        jawabAlternatif1[21 + 50][0].setBounds(505, 180, 100, 25);  
        jawabAlternatif1[22 + 50][0].setBounds(505, 210, 100, 25);  
        jawabAlternatif1[23 + 50][0].setBounds(505, 240, 100, 25);  
        jawabAlternatif1[24 + 50][0].setBounds(505, 270, 100, 25); 
        jawabAlternatif1[0 + 50][1].setBounds(101, 450, 100, 25);  
        jawabAlternatif1[1 + 50][1].setBounds(101, 480, 100, 25);  
        jawabAlternatif1[2 + 50][1].setBounds(101, 510, 100, 25);  
        jawabAlternatif1[3 + 50][1].setBounds(101, 540, 100, 25);  
        jawabAlternatif1[4 + 50][1].setBounds(101, 570, 100, 25);  
        jawabAlternatif1[5 + 50][1].setBounds(202, 450, 100, 25);  
        jawabAlternatif1[6 + 50][1].setBounds(202, 480, 100, 25);  
        jawabAlternatif1[7 + 50][1].setBounds(202, 510, 100, 25);  
        jawabAlternatif1[8 + 50][1].setBounds(202, 540, 100, 25);  
        jawabAlternatif1[9 + 50][1].setBounds(202, 570, 100, 25);  
        jawabAlternatif1[10 + 50][1].setBounds(303, 450, 100, 25);  
        jawabAlternatif1[11 + 50][1].setBounds(303, 480, 100, 25);  
        jawabAlternatif1[12 + 50][1].setBounds(303, 510, 100, 25);  
        jawabAlternatif1[13 + 50][1].setBounds(303, 540, 100, 25);  
        jawabAlternatif1[14 + 50][1].setBounds(303, 570, 100, 25);  
        jawabAlternatif1[15 + 50][1].setBounds(404, 450, 100, 25);  
        jawabAlternatif1[16 + 50][1].setBounds(404, 480, 100, 25);  
        jawabAlternatif1[17 + 50][1].setBounds(404, 510, 100, 25);  
        jawabAlternatif1[18 + 50][1].setBounds(404, 540, 100, 25);  
        jawabAlternatif1[19 + 50][1].setBounds(404, 570, 100, 25);  
        jawabAlternatif1[20 + 50][1].setBounds(505, 450, 100, 25);  
        jawabAlternatif1[21 + 50][1].setBounds(505, 480, 100, 25);  
        jawabAlternatif1[22 + 50][1].setBounds(505, 510, 100, 25);  
        jawabAlternatif1[23 + 50][1].setBounds(505, 540, 100, 25);  
        jawabAlternatif1[24 + 50][1].setBounds(505, 570, 100, 25);
        prosesAlternatifInkonsisten[2].setBounds(505, 600, 100, 25);
        alternatifTidakKonsistenSebelumnya[2].setBounds(0, 600, 100, 25);
        xyzisi2();
        for (int mkli = 0 + 50; mkli < 25 + 50; mkli++) {        
            alternatifKriteria3.add(jawabAlternatif1[mkli][c]);}
        for (int yulp = 0; yulp < labelLuarAlternatif.length; yulp++){
        alternatifKriteria3.add(labelLuarAlternatif[yulp][c]); }
        alternatifKriteria3.add(prosesAlternatifInkonsisten[2]);
        alternatifKriteria3.add(alternatifTidakKonsistenSebelumnya[2]);
        prosesAlternatifInkonsisten[2].setVisible(true);
        alternatifTidakKonsistenSebelumnya[2].setVisible(true);
    }
    public void alternatifKriteria4TdkKonsisten(){
        alternatifKriteria4.setTitle(lblKriteria[3][c]);
        alternatifKriteria4.setVisible(true);
        alternatifKriteria4.setSize(768, 640);
        alternatifKriteria4.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        alternatifKriteria4.setLocationRelativeTo(null);
        posisiLabelAlternatif();
        jawabAlternatif1[0 + 75][0].setBounds(101, 150, 100, 25);  
        jawabAlternatif1[1 + 75][0].setBounds(101, 180, 100, 25);  
        jawabAlternatif1[2 + 75][0].setBounds(101, 210, 100, 25);  
        jawabAlternatif1[3 + 75][0].setBounds(101, 240, 100, 25);  
        jawabAlternatif1[4 + 75][0].setBounds(101, 270, 100, 25);  
        jawabAlternatif1[5 + 75][0].setBounds(202, 150, 100, 25);

  8. #8
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,958
    Rep Power
    8

    Default Re: Please help with my program

    ....are you serious? Thread closed.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Replies: 6
    Last Post: 12-15-2013, 06:40 AM
  2. Replies: 4
    Last Post: 11-21-2012, 01:19 PM
  3. Replies: 2
    Last Post: 04-02-2011, 12:57 PM
  4. Replies: 13
    Last Post: 03-22-2011, 06:49 AM
  5. Replies: 0
    Last Post: 10-04-2007, 09:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •