I have a problem on checking the text and string.
public boolean Isequals(Object c){
boolean check = false;
if (c instanceof MyTextTwist){
MyTextTwist tt = (MyTextTwist)c;
if (txtGuessPad.getText().equals(answer))
check = true;}
return check;
}
this what i have so far.
Since your question is not very clear, i suggest these answers:
1st option – you want to get string from your JTextField:
2nd option – you want to check if text contains only letter:
3rd option – you want to compare two strings (one of them is from JTextField):
4th option – let’s put it in a function: