简体   繁体   中英

How can i make my checkbox checked by itself

I'm basically facing an issue with a checkbox. Indeed, I'd like to use a button which is gonna look for a boolean value in my database, and if the value is true and that i click on the button, the box is going to get checked by itself.

if(myValue.isTrue()) 
{
this.mybox."getchecked()";
}

But I don't know how to do so, which methods to use, and have not been able to find any results for netbeans do you guys have any solution, thanks for all.

这可以通过以下方法完成: this.mybox.setSelected(true);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM