I am trying 2 write a program to solve a soduko.
I have lots of text fields and I need to compare them like
if (string1.equals(textfield){ do whatever}

but it only works for "0" e.g null??/
I have tried parsing it to an int but get the same result.
any ideas

Try using this:
String value = myTextField.getText();

I thought I tried that but I got it to work cheers mate, he's what I was using for anyone with the same problem

String mydata =  numberGrid[j].getText();


if (mydata.equals("1")){
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.