What is the result of the following code, assuming that outputJTextArea is a JTex- tArea?

```
1 private void colorJMenuItemActionPerformed( ActionPerformed event )
2 {
3 Color backgroundColor = JColorChooser.showDialog(
4 null, "Choose a color", Color.BLACK );
5
6 if ( backgroundColor != null )
7 {
8 outputJTextArea.setBackground( backgroundColor );
9 }
10
11 } // end method colorJMenuItemActionPerformed
```


This code displays a JColorChooser and sets the outputJTextArea’s background color to the color selected. If no color is selected, the background color is not changed.

Computer Science & Information Technology

You might also like to view...

Constructing one class from another is accomplished by using a capability called ____.

A. inheritance B. polymorphism C. code reuse D. object-oriented programming

Computer Science & Information Technology

In the Building Blocks Organizer, click Name at the top of the column to sort the building blocks alphabetically by name

Indicate whether the statement is true or false

Computer Science & Information Technology

In PowerPoint, a video clip can be trimmed anywhere in the clip.?

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

Computer Science & Information Technology

Why do the query tables use an underscore in their names?

A. ?It identifies it as a query table. B. ?Excel has definite rules about how to name different tables. C. ?Database structures rarely allow spaces in the names of files or fields D. ?It prevents the table from being read by other databases.

Computer Science & Information Technology