Explain how one component can use two separate listeners at the same time. Give an example.

What will be an ideal response?


One component may generate two different types of events. For example, a panel can generate a mouse pressed event and a key pressed event. Therefore, two different listeners, one for each type, can be added to the component. When an event occurs, only the appropriate method of the appropriate listener is called.

Computer Science & Information Technology

You might also like to view...

The ________ format is a file type that captures the content of the document and saves it in a non-editable format

Fill in the blank(s) with correct word

Computer Science & Information Technology

A ____ Web site structure organizes pages by level of detail.

A. hierarchical B. linear C. webbed D. framed

Computer Science & Information Technology

An input message appears when the cell becomes active, and can be used to specify the _____ of data the user should enter in that cell.

A. aspect B. type C. format D. cast

Computer Science & Information Technology

A blind copy notation appears on the original letter and on all copies of the letter.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology