Java Reference
In-Depth Information
F
IGURE
32.28
The
DBConnectionPane
component enables the user to enter database information.
*32.4
(
Find grades
) Listing 32.2, FindGrade.java, presented a program that finds a stu-
dent's grade for a specified course. Rewrite the program to find all the grades for
a specified student, as shown in Figure 32.29.
F
IGURE
32.29
The program displays the grades for the courses for a specified student.
*32.5
(
Display table contents
) Write a program that displays the content for a given
table. As shown in Figure 32.30a, you enter a table and click the
Show Contents
button to display the table contents in the text area.
(a)
(b)
F
IGURE
32.30
(a) Enter a table name to display the table contents. (b) Select a table name from the combo box to
display its contents.
*32.6
(
Find tables and showing their contents
) Write a program that fills in table names
in a combo box, as shown in Figure 32.30b. You can select a table from the combo
box to display its contents in the text area.
**32.7
(
Populate Quiz table
) Create a table named
Quiz
as follows:
create table
Quiz(
questionId
int
,
question
varchar
(
4000
),
choicea
varchar
(
1000
),
Search WWH ::
Custom Search