Question: 1. The class AbstractButton is abstract. It is a sublcass of the JComponent class. It also implements two interfaces: ItemSelectable and SwingConstants. Fill in the

1. The class AbstractButton is abstract. It is a sublcass of the JComponent class. It also implements two interfaces: ItemSelectable and SwingConstants. Fill in the blanks to complete the declaration of the class (case sensitive, check your spelling):

public ______ class AbstractButton ______ JComponent _______

ItemSelectable, SwingConstants

2.

The ItemSelectable interface has method declaration for addItemListener, which returns void and has a parameter of type ItemListener. Which of the following code is correct for this declaration?

a.

public addItemListener(ItemListener l);

b.

public abstract void addItemListener(ItemListener l);

c.

public void addItemListener(ItemListener l) { }

d.
public abstract void addItemListener(String l); 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!