1. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    347
    Why does the code still show Koneksi ke Paduk Data sudah Terputus?
    The code would set that message if the value returned by connection.isClosed()
    is false.
    What value is returned by connection.isClosed()? Move the println statement as shown here:
    Code:
                 System.out.println("con = " + connection.isClosed());  //  show BEFORE if
    
                  if (connection.isClosed())  
                       {  
                       statusKoneksi.setText("Tidak ada Koneksi ke Paduk Data"); 
                       myocardialInfarction.setVisible(false);
  2. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    257
    Rep Power
    0
    Originally Posted by NormR
    The code would set that message if the value returned by connection.isClosed()
    is false.
    What value is returned by connection.isClosed()? Move the println statement as shown here:
    Code:
                 System.out.println("con = " + connection.isClosed());  //  show BEFORE if
    
                  if (connection.isClosed())  
                       {  
                       statusKoneksi.setText("Tidak ada Koneksi ke Paduk Data"); 
                       myocardialInfarction.setVisible(false);
    It did not show any things, so? What should I do? No thing is happening if I change the if to become else and else to become if. What should I do?
    Last edited by Tawijakarta; June 23rd, 2013 at 10:33 AM.
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    347
    It did not show any things,
    That means the println() statement was not executed.

    To see where the code is executing, you need to add lots of println statements that print out messages to show where the code is being executed.
    A message will print if a println() statement is executed
    and a nothing is printed if a println() statement is NOT executed.


    Do all the catch() blocks have calls to the printStackTrace() method so that ALL errors will cause a message to be printed?
  4. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    257
    Rep Power
    0
    Originally Posted by NormR
    That means the println() statement was not executed.

    To see where the code is executing, you need to add lots of println statements that print out messages to show where the code is being executed.
    A message will print if a println() statement is executed
    and a nothing is printed if a println() statement is NOT executed.


    Do all the catch() blocks have calls to the printStackTrace() method so that ALL errors will cause a message to be printed?
    Yes, I already put new catch so? What should I do? It shows no error.
  5. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    347
    What statements and methods is the program executing when it is run? You need to add println() statements that print out messages as the program executes so you can see where it is executing.
    What would cause the program not to execute the println() statement you added before the if statement as shown in post#196?
    That println() statement has to be executed before either of the messages asked about in post#195 are shown.

    Is there some place else in the program where those messages are shown?
  6. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    257
    Rep Power
    0
    Originally Posted by NormR
    What statements and methods is the program executing when it is run? You need to add println() statements that print out messages as the program executes so you can see where it is executing.
    What would cause the program not to execute the println() statement you added before the if statement as shown in post#196?
    That println() statement has to be executed before either of the messages asked about in post#195 are shown.

    Is there some place else in the program where those messages are shown?
    What should I do? Please do that yourself because I really don't know where to put those println.
  7. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    347
    Look at the println() statements I have given you already and make more like that to show variables and values and when a method is called.
    I really don't know where to put those println.
    Here are some samples:
    Code:
       var = value;      //  value assigned to var
       System.out.println("var="+var); // show the new value of var
       ...
      public void aMethod(String aStr) {
        System.out.println("aMethod entered aStr="+aStr);  // show method called
        ...
        System.out.println("someVar="+someVar);  // show someVar before testing in if
        if(someVar == null) {
        ...
        }
    
       }
    The print out will show the new values of var and it will show when the aMethod() method was called.
    The whole of the print out will help you understand how the code is executing and where it is executing.
    Last edited by NormR; June 24th, 2013 at 07:40 AM.
  8. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    257
    Rep Power
    0
    Originally Posted by NormR
    Look at the println() statements I have given you already and make more like that to show variables and values and when a method is called.

    Here are some samples:
    Code:
       var = value;      //  value assigned to var
       System.out.println("var="+var); // show the new value of var
       ...
      public void aMethod(String aStr) {
        System.out.println("aMethod entered aStr="+aStr);  // show method called
        ...
        System.out.println("someVar="+someVar);  // show someVar before testing in if
        if(someVar == null) {
        ...
        }
    
       }
    The print out will show the new values of var and it will show when the aMethod() method was called.
    The whole of the print out will help you understand how the code is executing and where it is executing.
    Please do it for me because I don't know how to do that. What should I do to solve this problem?

    Here is the full updated code:

    Code:
    package programtesisbaru;  
      
      
    import java.awt.*;  
    import java.sql.*;  
    import java.util.logging.Level;  
    import java.util.logging.Logger;  
    import javax.swing.*;
    
    /** 
    * 
    * @author Tawi 
    */  
    public class ProgramTesisBaru extends FrameBaru {  
    Container konten = getContentPane();  
    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");  
    int i;  
    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");  
    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 statusKoneksi = new JLabel("Tidak ada Koneksi ke Paduk Data");  
    JLabel padukData = new JLabel("Paduk Data Belum Diubah");  
    String namaPengguna1 = new String();  
    String passwordPengguna1 = new String();  
    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");  
    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 usrname = new String();
    String psswrd = new String();
    String uniRL = (String)jcboURL.getSelectedItem();  
    String driver = (String) jcboDriver.getSelectedItem(); 
    
    public void connectToDB() { 
                    try {  
                        Class.forName(driver);  
                        connection = DriverManager.getConnection(uniRL, usrname, psswrd);  
                        //rowSet.setURL(uniRL);  
                        statusKoneksi.setText("Terhubung ke Paduk Data"); 
                        //statement = connection.createStatement();
                    }  
                    catch (java.lang.Exception x) { 
                        x.printStackTrace();
                        statusKoneksi.setText("Gagal Terhubung ke Paduk Data");  
                    }  
                }  
                
    public ProgramTesisBaru()  
    {   
       konten.setLayout(null); 
       // Atur letak beberapa komponen  
    
       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");  
       }    
       lblNama.setBounds(0,10,100,25);    
       txtNama.setBounds(130,10,200,25);  
       kataSandi.setBounds(330,10,100,25);   
       sandiKata.setBounds(410,10,200,25);    
       masuk.setBounds(600,10,100,25);  
       keluar.setBounds(700,10,100,25);    
       tombolHubungkankePadukData.setBounds(0,50,250,25);    
       putuskanKoneksiKePadukData.setBounds(250,50,250,25);    
       tombolUbahPadukData.setBounds(480,50,250,25);    
       tombolBatal.setBounds(730,50,250,25);    
       statusKoneksi.setBounds(800,10,200,25);    
       padukData.setBounds(0,70,200,25);  
       statusMasuk.setBounds(160,70,200,25);  
       myocardialInfarction.setBounds(0,120,200,25);
       konten.add(lblNama);
       konten.add(txtNama);
       konten.add(txtNama);
       konten.add(kataSandi); 
       konten.add(sandiKata);
       konten.add(masuk);
       konten.add(keluar);
       konten.add(tombolHubungkankePadukData);
       konten.add(putuskanKoneksiKePadukData);
       konten.add(tombolUbahPadukData);
       konten.add(tombolBatal);
       konten.add(statusKoneksi);
       konten.add(myocardialInfarction);  
       konten.add(padukData);  
       tombolHubungkankePadukData.setEnabled(false);  
       tombolBatal.setEnabled(false);  
       tombolUbahPadukData.setEnabled(false);  
       putuskanKoneksiKePadukData.setEnabled(false);  
       for (int jwbKri = 0; jwbKri < 4; jwbKri++)  
       {  
           jawabKriteria[jwbKri][0] = new JTextField(10);  
           jawabKriteria[jwbKri][1] = new JTextField(10);  
       }  
       for (int jwbAlt = 0; jwbAlt < 5; jwbAlt++)  
       {  
           jawabAlternatif[jwbAlt][0] = new JTextField(10);  
           jawabAlternatif[jwbAlt][1] = new JTextField(10);  
       }  
       for (int jwbKrif = 0; jwbKrif < 4; jwbKrif++)  
       {  
           jawabKriteria[jwbKrif][0].setVisible(false);  
           jawabKriteria[jwbKrif][1].setVisible(false);  
       }  
       for (int jwbAlt = 0; jwbAlt < 5; jwbAlt++)  
       {  
           jawabAlternatif[jwbAlt][0].setVisible(false);  
           jawabAlternatif[jwbAlt][1].setVisible(false);  
       }  
       lblNama.setVisible(true);  
       txtNama.setVisible(true);  
       kataSandi.setVisible(true);  
       sandiKata.setVisible(true);  
       masuk.setVisible(true);  
       keluar.setVisible(true);  
       tombolHubungkankePadukData.setVisible(true);  
       putuskanKoneksiKePadukData.setVisible(true);  
       tombolUbahPadukData.setVisible(true);  
       tombolBatal.setVisible(true);  
       lanjut.setVisible(false);  
       jcboURL.setVisible(true);  
       jcboDriver.setVisible(true);  
       statusKoneksi.setVisible(true);  
       padukData.setVisible(true);  
       myocardialInfarction.setVisible(false);  
       stroke.setVisible(false);  
       for (int hklma = 0; hklma < kriteria.length; hklma++) 
       {        
           kriteria[hklma][0].setVisible(false);    
           kriteria[hklma][1].setVisible(false);    
       }  
       for (int hklma = 0; hklma < alternatif.length; hklma++)     
       {    
           alternatif[hklma][0].setVisible(false);    
           alternatif[hklma][1].setVisible(false);
       }     
       statusMasuk.setVisible(true);  
       labelPerhitunganKriteria.setVisible(false);  
       tampilKriteria.setVisible(false);  
       tampilKriteria1.setVisible(false);  
       ubah.setVisible(false);  
       kembali.setVisible(false);  
       lanjutlah.setVisible(false);  
       lanjutlah1.setVisible(false);  
       perhitunganKriteria.setVisible(false);  
       perhitunganKriteria1.setVisible(false);  
       kmbl.setVisible(false);  
       kmbl1.setVisible(false);  
       update.setVisible(false);  
       update1.setVisible(false);  
       myocardInfarc.setVisible(false);  
       stroke1.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);    
           }    
       }  
       kriteriaLanjut.setVisible(false);  
       kriteriaLanjut1.setVisible(false);
       lanjut.addActionListener(new java.awt.event.ActionListener() 
       {  
          @Override  
          public void actionPerformed(java.awt.event.ActionEvent evt) 
          {  
              kontinu();  
          }  
          private void kontinu() 
          {  
              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 < passCriteriaVariables.length; aijkl++) 
                  {    
                     for (int aikjl = 0; aikjl < passCriteriaVariables[aijkl].length; 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 < passAlternativeVariables.length; lijkl++) 
                  {    
                      for (int likjl = 0; likjl < passAlternativeVariables[lijkl].length; likjl++) 
                          {    
                               passAlternativeVariables[lijkl][likjl] = jawabAlternatif[lijkl][likjl].getText();    
                          }    
                  }  
              lblKriteria = passCriteriaVariables;  
              lblAlternatif = passAlternativeVariables;  
              lblNama.setVisible(false);  
              txtNama.setVisible(false);  
              kataSandi.setVisible(false);  
              sandiKata.setVisible(false);  
              masuk.setVisible(false);  
              keluar.setVisible(false);  
              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);  
              labelPerhitunganKriteria.setVisible(true);  
              tampilKriteria.setVisible(true);  
              tampilKriteria1.setVisible(true);  
              ubah.setVisible(true);  
              kembali.setVisible(true);  
              lanjutlah.setVisible(true);  
              lanjutlah1.setVisible(true);  
              perhitunganKriteria.setVisible(true);  
              perhitunganKriteria1.setVisible(true);  
              kmbl.setVisible(true);  
              kmbl1.setVisible(true);  
              update.setVisible(true);  
              update1.setVisible(true);  
              myocardInfarc.setVisible(true);  
              stroke1.setVisible(true);  
              for (int hklma = 0; hklma < jawabKriteria1.length; hklma++) 
                  {    
                       jawabKriteria1[hklma][0].setVisible(true);
                       jawabKriteria1[hklma][1].setVisible(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);    
                           }    
                  }  
              kriteriaLanjut.setVisible(true);  
              kriteriaLanjut1.setVisible(true);  
              //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) 
          {  
              ubah();  
          }  
      
          private void ubah() 
          {  
              try {
                  if (connection.isClosed())
                     {
                        JOptionPane.showMessageDialog(null, "Hubungkan Dahulu ke Paduk Data", "Tidak Ada Koneksi", JOptionPane.INFORMATION_MESSAGE);
                     }
                  else 
                     {
                        for (int lmo = 0; lmo < 4; lmo++)  
                            {  
                                 jawabKriteria[lmo][0].setEditable(true);
                                 jawabKriteria[lmo][0].setVisible(true);
                                 jawabKriteria[lmo][1].setEditable(true);  
                                 jawabKriteria[lmo][1].setVisible(true);
                                 kriteria[lmo][0].setVisible(true);
                                 kriteria[lmo][1].setVisible(true);
                            }  
                        for (int mlo = 0; mlo < 5; mlo++)  
                            {  
                                 jawabAlternatif[mlo][0].setEditable(true);  
                                 jawabAlternatif[mlo][0].setVisible(true);
                                 jawabAlternatif[mlo][1].setEditable(true);  
                                 jawabAlternatif[mlo][1].setVisible(true);
                                 alternatif[mlo][0].setVisible(true);
                                 alternatif[mlo][1].setVisible(true);
                            }  
                        lanjut.setEnabled(true); 
                        lanjut.setVisible(true);
                        myocardialInfarction.setVisible(true);
                        stroke.setVisible(true);  
                      }
              } catch (SQLException ex) {
                  ex.printStackTrace();
                  Logger.getLogger(ProgramTesisBaru.class.getName()).log(Level.SEVERE, null, ex);
              }
          }
       });  
       putuskanKoneksiKePadukData.addActionListener(new java.awt.event.ActionListener() {  
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) 
                {  
                    putuskan();    
                }  
      
                private void putuskan() 
                {  
                  try 
                  {
                      System.out.println("Connection = " + connection.isClosed());
                    if (connection.isClosed())  
                       {  
                         statusKoneksi.setText("Koneksi ke Paduk Data sudah Terputus");  
                      for (int lko = 0; lko < 4; lko++)  
                          {  
                              kriteria[lko][0].setVisible(false);
                              kriteria[lko][1].setVisible(false);
                              jawabKriteria[lko][0].setEditable(false);  
                              jawabKriteria[lko][1].setEditable(false); 
                              jawabKriteria[lko][0].setVisible(false);  
                              jawabKriteria[lko][1].setVisible(false);  
                          }  
                      for (int lok = 0; lok < 5; lok++)  
                          {  
                             alternatif[lok][0].setVisible(false);
                             alternatif[lok][1].setVisible(false);
                             jawabAlternatif[lok][0].setEditable(false);  
                             jawabAlternatif[lok][1].setEditable(false); 
                             jawabAlternatif[lok][0].setVisible(false);  
                             jawabAlternatif[lok][1].setVisible(false);
                          }                    
                       }
                    else {
                       statusKoneksi.setText("Tidak ada Koneksi ke Paduk Data"); 
                       System.out.println("con = " + connection.isClosed());  
                       myocardialInfarction.setVisible(false);
                       stroke.setVisible(false);
                       for (int ltu = 0; ltu < 4; ltu++)  
                           {  
                               kriteria[ltu][0].setVisible(false);
                               kriteria[ltu][1].setVisible(false);
                               jawabKriteria[ltu][0].setEditable(false);  
                               jawabKriteria[ltu][1].setEditable(false); 
                               jawabKriteria[ltu][0].setVisible(false);  
                               jawabKriteria[ltu][1].setVisible(false);  
                           }  
                       for (int tlu = 0; tlu < 5; tlu++)  
                           {  
                               jawabAlternatif[tlu][0].setEditable(false);  
                               jawabAlternatif[tlu][1].setEditable(false);  
                               jawabAlternatif[tlu][0].setVisible(false);  
                               jawabAlternatif[tlu][1].setVisible(false);
                               alternatif[tlu][1].setVisible(false);
                               alternatif[tlu][0].setVisible(false);
                           }  
                   }  
                    /*else   
                       {  
                      statusKoneksi.setText("Koneksi ke Paduk Data sudah Terputus");  
                      for (int lko = 0; lko < 4; lko++)  
                          {  
                              kriteria[lko][0].setVisible(false);
                              kriteria[lko][1].setVisible(false);
                              jawabKriteria[lko][0].setEditable(false);  
                              jawabKriteria[lko][1].setEditable(false); 
                              jawabKriteria[lko][0].setVisible(false);  
                              jawabKriteria[lko][1].setVisible(false);  
                          }  
                      for (int lok = 0; lok < 5; lok++)  
                          {  
                             alternatif[lok][0].setVisible(false);
                             alternatif[lok][1].setVisible(false);
                             jawabAlternatif[lok][0].setEditable(false);  
                             jawabAlternatif[lok][1].setEditable(false); 
                             jawabAlternatif[lok][0].setVisible(false);  
                             jawabAlternatif[lok][1].setVisible(false);
                          }                  
                   }*/  
                    connection.close();
                    statement.close();
                    pernyataan.close();
                    myocardialInfarction.setVisible(false);
                    stroke.setVisible(false);
                  }
                  catch (SQLException ex) 
                   {
                    ex.printStackTrace();
                   }
       }});
    Last edited by Tawijakarta; June 24th, 2013 at 06:11 PM.
  9. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    257
    Rep Power
    0
    Code:
    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());
                    if (("".equals(usrname)) && ("".equals(psswrd)))   
                                 {  
                                   tombolHubungkankePadukData.setEnabled(false);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   tombolUbahPadukData.setEnabled(false);  
                                   tombolBatal.setEnabled(false);  
                                   masuk.setEnabled(true);
                                   statusKoneksi.setText("Tidak Ada Koneksi ke Paduk Data");
                                   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("Tidak Ada Koneksi ke Paduk Data");
                                   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("Tidak Ada Koneksi ke Paduk Data");
                                   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();
                        Logger.getLogger(ProgramTesisBaru.class.getName()).log(Level.SEVERE, null, ex);
                    }
                }   
                private void entryPrg() {  
                          connectToDB();
                          try {
                          //System.out.println("con="+connection.isClosed());
                              statement = connection.createStatement();
                              pernyataan = connection.createStatement();
                              loginName = "select Nama_Dokter from tblDokterAhli where Nama_Dokter = '"+usrname+"'";  
                          //System.out.println(loginName);
                              loginPassword = "select Kata_Kunci from tblDokterAhli where Kata_Kunci = '"+psswrd+"' and Nama_Dokter = '"+usrname+"'";
                              ResultSet logName = statement.executeQuery(loginName);  
                          //System.out.println(logName);
                              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("Terhubung ke Paduk Data");
                                   keluar.setEnabled(true);  
                                   putuskanKoneksiKePadukData.setEnabled(true);  
                                   statement.close();
                                   connection.close();
                                   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("Tidak Ada Koneksi ke Paduk Data");
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   JOptionPane.showMessageDialog(null, dx, ex, JOptionPane.INFORMATION_MESSAGE);  
                                   connection.close();
                                   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("Tidak Ada Koneksi ke Paduk Data");
                                   keluar.setEnabled(true);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   JOptionPane.showMessageDialog(null, dx, ex, JOptionPane.INFORMATION_MESSAGE);  
                                   connection.close();
                                   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("Tidak Ada Koneksi ke Paduk Data");
                                   keluar.setEnabled(true);  
                                   putuskanKoneksiKePadukData.setEnabled(false);  
                                   JOptionPane.showMessageDialog(null, dx, ex, JOptionPane.INFORMATION_MESSAGE);  
                                   connection.close();
                                   statement.close();
                                   pernyataan.close();
                               }  
                          }  
                          catch (java.lang.Exception ex){ 
                              ex.printStackTrace();
                              statusMasuk.setText("Gagal Masuk");  
                          }
                }});
    
       keluar.addActionListener(new java.awt.event.ActionListener() {  
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {  
                    keluar();  
                }  
      
                private void keluar() {  
                    System.exit(0);  
                }  
            });  
       tombolBatal.addActionListener(new java.awt.event.ActionListener() {  
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {  
                    batal();  
                }  
      
                private void batal() { 
                    try {
                        if (connection.isClosed()) {
                          JOptionPane.showMessageDialog(null, "Hubungkan Dahulu ke Paduk Data", "Kesalahan", JOptionPane.INFORMATION_MESSAGE);
                        }
                        else {
                          myocardialInfarction.setVisible(false);
                          stroke.setVisible(false);
                          for (int k = 0; k < 4; k++)  
                             {  
                                jawabKriteria[k][0].setText("");  
                                jawabKriteria[k][1].setText("");  
                                kriteria[k][0].setVisible(false);
                                kriteria[k][1].setVisible(false);
                             }  
                          for (int lkm = 0; lkm < 5; lkm++)  
                             {  
                                jawabAlternatif[lkm][0].setText("");  
                                jawabAlternatif[lkm][1].setText("");  
                                alternatif[lkm][0].setVisible(false);
                                alternatif[lkm][1].setVisible(false);
                             }  
                          for (int lqj = 0; lqj < 4; lqj++)  
                             {  
                                jawabKriteria[lqj][0].setEditable(false);  
                                jawabKriteria[lqj][1].setEditable(false); 
                                jawabKriteria[lqj][0].setVisible(false);  
                                jawabKriteria[lqj][1].setVisible(false);  
                             }  
                          for (int ljq = 0; ljq < 5; ljq++)  
                             {  
                                jawabAlternatif[ljq][0].setEditable(false);  
                                jawabAlternatif[ljq][1].setEditable(false);  
                                jawabAlternatif[ljq][0].setVisible(false);  
                                jawabAlternatif[ljq][1].setVisible(false);  
                             }  
                          lanjut.setEnabled(false);  
                      }
                    } catch (SQLException ex) {
                        ex.printStackTrace();
                        Logger.getLogger(ProgramTesisBaru.class.getName()).log(Level.SEVERE, null, ex);
                    }
    }  
            });  
       tombolHubungkankePadukData.addActionListener(new java.awt.event.ActionListener() {  
                @Override  
                public void actionPerformed(java.awt.event.ActionEvent evt) {  
                    try {
                        if (connection.isClosed())  
                         {  
                             connectToDB();    
                         }  
                        else  
                         {  
                            statusKoneksi.setText("Sudah Terhubung ke Paduk Data");  
                         }
                    } catch (SQLException ex) {
                        ex.printStackTrace();
                        Logger.getLogger(ProgramTesisBaru.class.getName()).log(Level.SEVERE, null, ex);
                    }
                }  
        });  
    for (int m = 0; m <5; m++)  
       {  
          jawabAlternatif[m][0].setEditable(false);  
          jawabAlternatif[m][1].setEditable(false);  
       }  
    for (int hki = 0; hki < 4; hki++)  
       {  
          jawabKriteria[hki][0].setEditable(false);  
          jawabKriteria[hki][1].setEditable(false);  
       }  
    // Tanda Alternatif Harga Myocardial Infarction  
    kriteria[0][0].setBounds(1,200,100,25);  
    kriteria[1][0].setBounds(1,230,100,25);  
    kriteria[2][0].setBounds(1,260,100,25);  
    kriteria[3][0].setBounds(1,290,100,25);  
    for (int lop = 0; lop < 4; lop++)  
       {  
          konten.add(kriteria[lop][0]);  
       }  
    // Alternatif Sakit Harga Myocardial Infarction  
    jawabKriteria[0][0].setBounds(101,200,70,25);  
    jawabKriteria[1][0].setBounds(101,230,70,25);  
    jawabKriteria[2][0].setBounds(101,260,70,25);  
    jawabKriteria[3][0].setBounds(101,290,70,25);  
    for (int jki = 0; jki < 4; jki++)  
       {  
          konten.add(jawabKriteria[jki][0]);  
       }  
    // Kriteria Sakit Myocardial Infarction  
    alternatif[0][0].setBounds(200,200,100,25);  
    alternatif[1][0].setBounds(200,230,100,25);  
    alternatif[2][0].setBounds(200,260,100,25);  
    alternatif[3][0].setBounds(200,290,100,25);  
    alternatif[4][0].setBounds(200,320,100,25);  
      
    for (int loyo = 0; loyo < 5; loyo++)  
       {  
          konten.add(alternatif[loyo][0]);  
       }  
    jawabAlternatif[0][0].setBounds(360,200,70,25);  
    jawabAlternatif[1][0].setBounds(360,230,70,25);  
    jawabAlternatif[2][0].setBounds(360,260,70,25);  
    jawabAlternatif[3][0].setBounds(360,290,70,25);  
    jawabAlternatif[4][0].setBounds(360,320,70,25);  
    for (int gfk = 0; gfk < 5; gfk++)  
       {  
           konten.add(jawabAlternatif[gfk][0]);  
       }  
    // Awal Stroke  
    stroke.setBounds(0,380,200,25);  
    konten.add(stroke);  
    // Tanda Kriteria Stroke  
    kriteria[0][1].setBounds(1,420,200,25);  
    kriteria[1][1].setBounds(1,450,200,25);  
    kriteria[2][1].setBounds(1,480,200,25);  
    kriteria[3][1].setBounds(1,510,200,25);  
    for (int gdu = 0; gdu < 4; gdu++)  
       {  
          konten.add(kriteria[gdu][1]);  
       }  
    // Kriteria Sakit Stroke  
    jawabKriteria[0][1].setBounds(101,420,60,25);  
    jawabKriteria[1][1].setBounds(101,450,60,25);  
    jawabKriteria[2][1].setBounds(101,480,60,25);  
    jawabKriteria[3][1].setBounds(101,510,60,25);  
    for (int jku = 0; jku < 4; jku++)  
       {  
          konten.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++)  
       {  
          konten.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++)  
       {  
          konten.add(jawabAlternatif[gfki][1]);  
       }  
    lanjut.setBounds(880,560,100,25);  
    konten.add(lanjut);  
    lanjut.setEnabled(false);  
      
    } //Akhir Konstruktor  
    
    public static void main(String[] args)  
    {  
            ProgramTesisBaru tesis = new ProgramTesisBaru();   
            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);  
    }};
    This is the other part of the code
  10. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    347
    What variable is a problem? Is it connection? The posted code has some println statements BUT they are commented out. They won't show any information if they are commented out.
    What should I do to solve this problem?
    Add a println after every statement that changes the value of the connection that shows the status of the connection.
    Also print out the value of connection just before its value is tested in any if statement.

    Then execute the code, copy the output and paste it here.
  11. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    257
    Rep Power
    0
    Originally Posted by NormR
    What variable is a problem? Is it connection? The posted code has some println statements BUT they are commented out. They won't show any information if they are commented out.

    Add a println after every statement that changes the value of the connection that shows the status of the connection.
    Also print out the value of connection just before its value is tested in any if statement.

    Then execute the code, copy the output and paste it here.
    Code:
    private void ubah() 
          {  
              System.out.println("Connection Status is "+connection);
              try {
                  System.out.println("Connection Status is "+connection);
                  if (connection.isClosed())
                     {
                        JOptionPane.showMessageDialog(null, "Hubungkan Dahulu ke Paduk Data", "Tidak Ada Koneksi", JOptionPane.INFORMATION_MESSAGE);
                     }
                  else 
                     {
                        for (int lmo = 0; lmo < 4; lmo++)  
                            {  
                                 jawabKriteria[lmo][0].setEditable(true);
                                 jawabKriteria[lmo][0].setVisible(true);
                                 jawabKriteria[lmo][1].setEditable(true);  
                                 jawabKriteria[lmo][1].setVisible(true);
                                 kriteria[lmo][0].setVisible(true);
                                 kriteria[lmo][1].setVisible(true);
                            }  
                        for (int mlo = 0; mlo < 5; mlo++)  
                            {  
                                 jawabAlternatif[mlo][0].setEditable(true);  
                                 jawabAlternatif[mlo][0].setVisible(true);
                                 jawabAlternatif[mlo][1].setEditable(true);  
                                 jawabAlternatif[mlo][1].setVisible(true);
                                 alternatif[mlo][0].setVisible(true);
                                 alternatif[mlo][1].setVisible(true);
                            }  
                        lanjut.setEnabled(true); 
                        lanjut.setVisible(true);
                        myocardialInfarction.setVisible(true);
                        stroke.setVisible(true);  
                      }
              } catch (SQLException ex) {
                  ex.printStackTrace();
                  Logger.getLogger(ProgramTesisBaru.class.getName()).log(Level.SEVERE, null, ex);
              }
    Ok, I put these codes but Java shows nothing, what should I do?
  12. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    347
    Java shows nothing
    That means the println() statement is NOT executing.
    Why do you expect that println() in the ubah() method to execute? Where is the code that calls the ubah() method?


    Are you sure you are executing the code that was posted? Add lots of calls to the println method starting with in the main() method so you will know if the code is executing.
    Code:
    public static void main(String[] args)  
    {  
            System.out.println("in main method"); //<<<< show that method was called
            ProgramTesisBaru tesis = new ProgramTesisBaru();   
            tesis.setTitle("Program Pemilihan Obat dengan Cara Analytic Hierarchycal Process");  
            tesis.setSize(1024,768);
    Also add the same kind of code to the constructor and to ALL of the methods in the program.
    If nothing prints, then you know that the code is not being executed.
  13. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    257
    Rep Power
    0
    Originally Posted by NormR
    That means the println() statement is NOT executing.
    Why do you expect that println() in the ubah() method to execute? Where is the code that calls the ubah() method?


    Are you sure you are executing the code that was posted? Add lots of calls to the println method starting with in the main() method so you will know if the code is executing.
    Code:
    public static void main(String[] args)  
    {  
            System.out.println("in main method"); //<<<< show that method was called
            ProgramTesisBaru tesis = new ProgramTesisBaru();   
            tesis.setTitle("Program Pemilihan Obat dengan Cara Analytic Hierarchycal Process");  
            tesis.setSize(1024,768);
    Also add the same kind of code to the constructor and to ALL of the methods in the program.
    If nothing prints, then you know that the code is not being executed.
    Do I have to put the if part in the main()? Please just tell me what to do not put the println, ok? I need to solve this immediately ok?

    Code:
    tombolUbahPadukData.addActionListener(new java.awt.event.ActionListener() 
       {  
          @Override  
          public void actionPerformed(java.awt.event.ActionEvent evt) 
          {  
              ubah();  
          }  
      
          private void ubah() 
          {  
              try {
                  if (connection.isClosed())
                     {
                        JOptionPane.showMessageDialog(null, "Hubungkan Dahulu ke Paduk Data", "Tidak Ada Koneksi", JOptionPane.INFORMATION_MESSAGE);
                     }
                  else 
                     {
                        for (int lmo = 0; lmo < 4; lmo++)  
                            {  
                                 jawabKriteria[lmo][0].setEditable(true);
                                 jawabKriteria[lmo][0].setVisible(true);
                                 jawabKriteria[lmo][1].setEditable(true);  
                                 jawabKriteria[lmo][1].setVisible(true);
                                 kriteria[lmo][0].setVisible(true);
                                 kriteria[lmo][1].setVisible(true);
                            }  
                        for (int mlo = 0; mlo < 5; mlo++)  
                            {  
                                 jawabAlternatif[mlo][0].setEditable(true);  
                                 jawabAlternatif[mlo][0].setVisible(true);
                                 jawabAlternatif[mlo][1].setEditable(true);  
                                 jawabAlternatif[mlo][1].setVisible(true);
                                 alternatif[mlo][0].setVisible(true);
                                 alternatif[mlo][1].setVisible(true);
                            }  
                        lanjut.setEnabled(true); 
                        lanjut.setVisible(true);
                        myocardialInfarction.setVisible(true);
                        stroke.setVisible(true);  
                      }
              } catch (SQLException ex) {
                  ex.printStackTrace();
                  Logger.getLogger(ProgramTesisBaru.class.getName()).log(Level.SEVERE, null, ex);
              }
          }
       });
    Ok just read the above codes. If the technique to call the ubah() method is wrong, What will be the correct code?
    Last edited by Tawijakarta; June 28th, 2013 at 08:26 AM.
  14. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    347
    tell me what to do
    You need to debug your code so you understand what it is doing. Then you will be able to change the program to make it do what you want it to do.

    The println() in the main() method should NOT be inside an if statement. The purpose of the println() statement is to tell you what methods are executing. If the println in the main() method does not print when you execute the program, that means you are executing another program that does not have a println() in the main() method.
  15. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    257
    Rep Power
    0
    Originally Posted by NormR
    You need to debug your code so you understand what it is doing. Then you will be able to change the program to make it do what you want it to do.

    The println() in the main() method should NOT be inside an if statement. The purpose of the println() statement is to tell you what methods are executing. If the println in the main() method does not print when you execute the program, that means you are executing another program that does not have a println() in the main() method.
    It is outside the if part. So, how to call this ubah() method if the posted technique was wrong?

IMN logo majestic logo threadwatch logo seochat tools logo