Hi all

I hope that you can help me with a small issue I am having.

Basically I am trying to get my program to return true when a cell in
a grid is empty. I have found that if I print the contents of the
'empty' grid to console it is a single space character but if I try to
match it to that it returns false!

Here is a copy of my code:

String s = t.getText(1, 1); //the empty cel in the grid
String r = " "; //a string with just a single space

boolean b = t.getText(1, 1).equals(r);
System.out.println("Empty: " + b);

This outputs: Empty: false
in the console

I have tried matching a cell that has data in it and this returns true
which is confusing me!

Here is that copy:
boolean b2 = t.getText(3, 1).equals("event1");
System.out.println("Event1: " + b2);

This outputs: Event1: true
in console

Any help will be greatly appreciated!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to