title: Incompatible types in java
body: <p>I am trying to take a <code>String</code> from a <code>JTextField</code> using <code>getText</code> and apply it to the method
  <code>SearchString</code> but i am presented with the error <strong>Incompatible Types</strong> i cannot see anything wrong with this code however.</p>
  
  <p>ActionListner code:</p>
  
  <p><strong>String whatToSearch,result</strong></p>
  
  <p><strong>JTextField searchfield</strong></p>
  
  <p><strong>method SearchString</strong></p>
  
  <p>EDIT: have changed to Public String, but i am now given a Missing Return Statement error at the line shown above</p>