if(txtValueUIT.getText()==null || txtValueDolar.getText()==null || txtValueUIT.equals("") || txtValueDolar.equals(""))
JOptionPane.showMessageDialog(null, "You have not entered both values", "Error", JOptionPane.ERROR_MESSAGE);
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.
*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. *
The code that follows is a setText
to another component using as parameters Strings that get the Text from the JTextField
s
By the way:
if(e.getSource() == btnRefresh) //I added the button with an action listener
refreshValues(); //this contains the code with the JOptionPane