I have a method in the Family class
I want to add the value of the method to the JTextField
from the Driver Class.
Eclipse keeps showing errors offering to make the method a string. Any help on how to do this would be great.
method
public boolean AnswerCall(String r) {
boolean AnswerCall = true;
if(r == "Brother") {
AnswerCall = true;
}else {
AnswerCall = false;
}
return AnswerCall;
}
How I am currently calling it from the driver class that is extending Family.
JTextField jt9 = new JTextField(AnswerCall());