Java Reference
In-Depth Information
J ava 2
Java 2
v 5 . 0
13 Creating an Assignment Data File
v 5 . 0
Create an interface that lets you enter a description of your Java lab assignments
and the grades you receive, storing them in a file on your floppy disk. Create a
Submit button for the submission of each grade and a Done button to close the
file. When you click the Done button, the Submit button should disappear and a
Retrieve button should take its place. Use the new Ocean Look and Feel. Add
functionality to each button. Print a copy of the source code.
14 The W-2 Form
Assume that employee W-2 information has been stored in a sequential access
file. Obtain a copy of a sample W-2 form from your local post office or the IRS
Web site (www.irs.gov) and then create a storyboard, identifying the components
and containers. Write the code to make the interface look like the form. Name
each field appropriately. Finally, write the code to retrieve the information and
fill in the form. Print a copy of the source code.
J ava 2
J ava 2
v 5 . 0
15 Using Version 5.0 Features
v 5 . 0
The BillPayer program created in this chapter uses a content pane, adding
components by directly referring to the content pane. Read the Java 5.0 update
on page 454. J2SE version 5.0 allows programmers to add components to the
interface without explicitly referring to the content pane. Remove all references
to the content pane and compile the program. Fix any errors and submit a
printout of the code to your instructor.
Search WWH ::




Custom Search