In the figure above, which of the following describes what item A is pointing to?

A. The name of a dialog box
B. The name of a form
C. The name of a panel
D. The name of an object


Answer: C

Computer Science & Information Technology

You might also like to view...

The default implementation of method clone of Object performs a ________.

a. empty copy. b. deep copy. c. full copy. d. shallow copy.

Computer Science & Information Technology

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

1. The delay parameter in the Timer constructor is the amount of time between action events, measured in microseconds. 2. The following getAudioClip() method returns an object that will load the sound file and assign the location of that file to clip which can then be used to call methods that may play the sound file one or more times: ``` Audioclip clip = getAudioClip(getDocumentBase(), "mysound.wav");``` 3. A label's preferred size is determined only by calling the setPreferredSize method. 4. When you write a change listener class method for a slider, it must implement the ChangeListener interface which is in the javax.swing.event package.

Computer Science & Information Technology

(To-Do List Application) Use a JTextArea as a to-do list. Enter each item in a JTextField, and add it to the JTextArea by clicking a JButton. The item should be displayed in a numbered list as in Fig. 8.27. To do this, you will need JTextArea method getLineCount, which returns the number of lines in a JTextArea. The following statement assigns the number of lines displayed in the outputJTextArea to int variable counter:

```
int counter = outputJTextArea.getLineCount();
```

```
a) Copying the template to your working directory. Copy the directory C:Examples Tutorial08ExercisesToDoList to your C:SimplyJava directory.
b) Opening the template file. Open the ToDoList.java file in your text editor.
c) Adding code to the event handler for the Add JButton. Add code to the addJBut- tonActionPerformed event handler (which begins in line 82) to obtain the number of lines displayed in the outputJTextArea. Get the user input from taskJText- Field append it the outputJTextArea with a line number in front of it. After the input is added to the outputJTextArea, clear the taskJTextField.
d) Saving the application. Save your modified source code file.
e) Opening the Command Prompt window and changing directories. Open the Com- mand Prompt window by selecting Start > Programs > Accessories > Command Prompt. Change to your working directory by typing cd C:SimplyJavaToDoList.
f) C

Computer Science & Information Technology

Case-Based Critical Thinking QuestionsCase 4-2You have finished your coursework as a Web designer and you are preparing to teach a course about typography at the local community college. You review your notes to prepare for your first lecture.You tell students that a drawback of enlarging type is that the characters can look ____.

A. pixelated B. cramped C. digitized D. emphatic

Computer Science & Information Technology