leila la wrote:Ok I shall remove the == sign, but what do i put in that place? the word "equals" or just one equal sign? If it is just one equal sign, i get an error.
No, you put a call to the
equals() method, which is how you should ALWAYS compare objects. ie:
if ( X.equals(Y) ) ...
Winston
PS: A little tip for you - If one of the objects is a
String literal, it's often a good idea to put it first, ie:
if ( "Blue".equals(jcomboBox_LastTank.getSelectedItem()) )
rather than
if ( jcomboBox_LastTank.getSelectedItem().equals("Blue") )
because a literal can't possibly be null.