title: How to use 2 JDateChooser as a searching tool in JTable?
body: <p>I'm having problem with showing database values in my Jtable. I don't know how to use <code>JDataChooser</code> as a searching tool in <code>JTable</code>. I want the process like this, if <code>JDateChooser1</code> is select to <code>08-17-2017</code> and <code>JDateChooser2</code> is select <code>09-17-2017</code><br/>
  the <code>JTable</code> will only show the values that having that date between <code>08-17-2017 - 09-17-2017</code>. The format of the Date is (<code>MM-dd-yyyy</code>).</p>
  
  <p>I have this method and as a testing I put the method to a button. I also want to know where I can put this method to be able not using a button. Auto search when I'm done selecting the dates.</p>
  
  <p>sales is my table name in mysql and Date is the column name.</p>
  
  <pre><code>private void Dated() {
      try {
          String value1, value2;
          value1 = jDateChooser1.getDate().toString();
          value2 = jDateChooser2.getDate().toString();
          String sql = "select * from sales where Date = '" + value1 + "' and '" + value2 + "'";
          pst = conn.prepareStatement(sql);
          rs = pst.executeQuery();
  
      } catch (Exception e) {
          JOptionPane.showMessageDialog(null, e);
      }
  }
  </code></pre>