Solved

What Will the Following Code Do When It Is Executed

Question 34

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