How to know if a checkbox is not selected in Java

0

I know that with "isSelected ()" I can know if the checkbox is selected but, I am interested to know if the checkbox is not selected.

I tried doing:

chckbxProvincial == null;
!chckbxProvincial.isSelected()

It does not work for me.

I want to know if it is not selected to show a message.

I can not use an ELSE since I have many checkboxes and would like to validate this at all.

Any ideas?

    
asked by Robert Gomez 17.11.2016 в 05:13
source

1 answer

1

Solved. Thanks to "Alexis Rodriguez".

The correct way to know if a checkbox is not selected is:

!chckbx1.isSelected()
    
answered by 17.11.2016 / 05:48
source