Multiple choice

Which of the following methods are present in AbstractButton class?

  1. setTextVerticalPosition(int textPosition)

  2. setSelectedRolloverIcon(Icon rolloverSelectedIcon)

  3. setTextHorizontalPosition(int textPosition)

  4. setDisplayedMnemonicIndex(int index)

  5. setTextGap(int iconTextGap)

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

This is the correct choice because setDisplayedMnemonicIndex(int index)Method Provides a hint to the look and feel as to which character in the text should be decorated to represent the mnemonic and this method is present in AbstractButton class. So, this answer is correct.