Avatar of andyw27
andyw27
 asked on

Problem with function returning a boolean - displaying result in label ?

Hello,

I'm trying to call a function that returns a boolean value and have the results display in a Label. Here is the code that I have:

        int value;
        value=new Integer(txtEntry.getText()).intValue();
        list= new MyList();
        result.setText(list.method1(value));
        add(result);

and the error I get is this:

setText(java.lang.string) in java.awt.Label cannot be applied to (boolean)
Java

Avatar of undefined
Last Comment
andyw27

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
hongjun

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
andyw27

ASKER

Superb - many thanks.
Your help has saved me hundreds of hours of internet surfing.
fblack61