The conditions in your if statement are problematic:
testo.equals("") -
testo is an instance of of the JavaFX
TextField. It cannot equal to any
String. You need to obtain the actual value of the control by calling the
getText() method.
testo.getText()=="" - here you've avoided the previous mistake, but now you're comparing Strings using the equality operator. That's not going to work in
Java, you need to use
equals(). See
AvoidTheEqualityOperator.
testo.getText()== null - I don't think
TextField.getText() can ever return
null, but even if it could, it would be better to
test this case first. Testing it last doesn't make sense, you'd get a NullPointerException on the previous tests (well, assuming they would be implemented correctly).
Disclaimer: I don't know JavaFX, so there might be other problems here.