Okay, so I have been working on a chat program. Its a WIP doesn’t have networking yet. I need help checking if my “input” variable is empty. I tried checking if the length was equal to 0, but it still lets me enter a blank message. I need to make it so I can’t enter blank data, and it hasn’t been wanting to work.
if(input.getText().length() == 0) {
chat.append(username + ": " + input.getText() + "\n");
input.setText("");
}
Should be simple enough.