Computer Science, asked by kamadiyogesh0410, 7 months ago

the super class of all swing button is a) button b) button group c) jbutton d) abstractbutton​

Answers

Answered by sudhikshatech
0

Answer:

C is the right answer

Answered by arshikhan8123
0

ANSWER:

The correct option is d. AbstractButton

EXPLANATION:

There are four different types of buttons in Swing.

They are:

  1. JButton
  2. JToggleButton
  3. JCheckBox and
  4. JRadioButton

The above-mentioned 4 buttons are subclasses of the AbstractButton class, which extends JComponent.

Let’s analyse the options given in the question:

a.button - The button is a control component that has a label and generates an event when pressed

b.buttongroup - To create a multiple-exclusion scope for a set of buttons buttongroup is used. Creating a group of buttons with the identical ButtonGroup object means that turning "on" one button turns off all other buttons within the group

c.jbutton – This belongs to Swing, which is a subclass of the AbstractButton class.

d.abstractbutton – This is the correct option. Since all 4 swing buttons are subclasses of this class.

So, the superclass of all swing buttons is AbstractButton.

The correct option is d. AbstractButton

#SPJ2

Similar questions