Multiple choice

Which of the following methods is not present in AbstractButton class in java?

  1. setRolloverEnabled(boolean)

  2. setPressedIcon(Icon)

  3. setDisabledIcon(Icon)

  4. setSelectedIcon(Icon)

  5. setSelectedRolloverIcon(Icon)

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

This is the correct answer because there is no method named setSelectedRolloverIcon(Icon). The correct method name is setRolloverSelectedIcon(Icon), this method lets you specify the rollover icon when the button is selected. This is useful for two-state buttons such as toggle buttons. So, this is a correct choice.