title: null or empty string comparison in java? or Something else?
body: <pre><code>if(txtValueUIT.getText()==null || txtValueDolar.getText()==null || txtValueUIT.equals("") || txtValueDolar.equals(""))
  JOptionPane.showMessageDialog(null, "You have not entered both values", "Error", JOptionPane.ERROR_MESSAGE);
  </code></pre>
  
  <p>What I try to do is to show the Error Message when the JTextFfields are empty or null. 
  I am using if and it shows no bugs but when testing it it simply won't show the message when it is supposed to do it.</p>
  
  <p>*<em>It seems it doesn't perform any action at all because the code that follows in that method, when there is a value missing in those JtextFields, won't be processed. *</em></p>
  
  <p><strong>The code that follows is a <code>setText</code> to another component using as parameters Strings that get the Text from the <code>JTextField</code>s</strong></p>
  
  <p>By the way:</p>
  
  <pre><code>if(e.getSource() == btnRefresh) //I added the button with an action listener
  refreshValues(); //this contains the code with the JOptionPane
  </code></pre>