title: convert string to date java error "incompatible types"
body: <p>I success to get my date from JDateChooser into a string with this line: </p>
  
  <pre><code>String d1  = ((JTextField)jDateChooser1.getDateEditor().getUiComponent()).getText();
  </code></pre>
  
  <p>I want to know if there is any method to get a date from a JDateChooser ? </p>
  
  <p>I tried to convert this string into a date , and i have an error in the third line .</p>
  
  <blockquote>
    <p>"incompatible types : java.util.date cannot be converted to
    java.sql.Date "</p>
  </blockquote>
  
  <pre><code>    String s = "2011-07-08";
      SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
      Date date = sdf.parse(s);
  </code></pre>
  
  <p>i have to import the java.util.Date , But i have another error in the same line </p>
  
  <blockquote>
    <p>unreported exception ParseException ; must be caught or declared to be thrown</p>
  </blockquote>