title: How do I deal with simple if-else loop
body: <p>I am a novice programmer and have a basic question against if-else loop.
  I have a program that only gives else output and does not check my if condition. I guess its a syntax error and I am not able to figure it out.</p>
  
  <pre><code>public class adddeed 
  {
  private User user = new User();
  public void showdemo()
  {
      Form hi = new Form("Deed", BoxLayout.y());
      TextField first = new TextField("","Enter Description");
      Button b=new Button("Back");
      Button g=new Button("Go");
      String s=first.getText();
      DBHandler db=new DBHandler();
      g.addActionListener(e -&gt; 
      {
          if(s.equals(null))
          {
              Dialog.show(null,"Please Enter a Deed","OK",null);
          }
          else
          {
          Dialog.show(null,"Deed Uploaded Successfully","OK",null);
          }
      });
      b.addActionListener(e -&gt; 
      {
          new Home(user).show();
          //new adddeed().showdemo();
      });
      hi.add(first);
      hi.add(b);
      hi.add(g);
      hi.show();
  }
  }
  </code></pre>
  
  <p>Expected result should be when I don't enter anything in textfield, and press GO, it should say "please enter a deed."
  Actual result is every time I press Go whether the textfield is empty or not empty, it shows "Deed Uploaded Successfully".</p>