I'm using a GUI and using lists. When the list is empty and they press the 'show list' button, instead of it just displaying "[]" I want to create an if statement that results in the message "your list is empty" instead. I have tried along the lines of this
if(!myList.contains(null)) { // problem here
listBox.setText(myList.toString());
}else{
listBox.setText("Your list is empty");
}
I've also tried !myList.contains("") but that doesn't seem to work either. Any help much appreciated. Thanks.