To add the JList object addressList to a scroll pane named scrollPane, use the following:

A) JScrollPane scrollPane = new JScrollPane(addressList);
B) scrollPane.add(addressList);
C) addressList.add(scrollPane);
D) addressList.addScrollPane(scrollPane);

A) JScrollPane scrollPane = new JScrollPane(addressList);

Computer Science & Information Technology

You might also like to view...

AND, OR, and NOT are ________ operators

Fill in the blank(s) with correct word

Computer Science & Information Technology

Assume class Book has been declared. Which set of statements creates an array of Books?

a. Book[] books; books = new Book[numberElements]; b. Book[] books]; books = new Book()[numberElements]; c. new Book() books[]; books = new Book[numberElements]; d. All of the above.

Computer Science & Information Technology