96.7k views
0 votes
Which method returns true if the radio button radOne has been selected by the user?

radOne.Selected()
radOne.Selected(true)
radOne.isSelected(true)
radOne.isSelected()

User Ole Media
by
5.7k points

1 Answer

4 votes

Answer:

radOne.isSelected()

Step-by-step explanation:

The isSelected method is defined in javax.swing.AbstractButton. JRadioButton is a subclass of AbstractButton and can therefore use the isSelected method to determine the selection state of the RadioButton. This method returns a boolean value. The return value is true if the radio button is selected and it is false otherwise. The application can invoke this method to determine the current state and execute the relevant code segment accordingly.

User Beans On Toast
by
6.0k points