Solved

What Will the Following Code Do When It Is Executed

Question 21

Multiple Choice

What will the following code do when it is executed?
JTextArea message = JTextArea(greetings, 50, 70) ;
JScrollPane scrollPane = new JScrollPane(message) ;


A) It will create a JScrollPane object for the JTextArea object referenced by message and display a horizontal scroll bar on the text area.
B) It will create a JScrollPane object for the JTextArea object referenced by message and display a vertical scroll bar on the text area.
C) It will create a JScrollPane object for the JTextArea object referenced by message and display both vertical and horizontal scroll bars on the text area.
D) It will create a JScrollPane object for the JTextArea object referenced by message and display no scroll bars on the text area.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents