Java Reference
In-Depth Information
Table 5-3 Components and Variables Used in the Reservations Class (continued)
VARIABLE NAME
DATA TYPE OR COMPONENT
PURPOSE
custNameLabel
Label
Displays a Label prompt for input of customer name
custPhoneLabel
Label
Displays a Label prompt for input of customer phone number
e
ActionEvent
References the object that triggers the actionPerformed()
event and windowClosing() event
f
Frame
Holds the instantiation of the Reservations class
hidden
Checkbox
Serves as an option button that will not display, used to reset
other option buttons through programming
i
int
Used to increment a loop
inputPanel
Panel
Serves as a container to hold and position input components
lightGreen
Color
Used as a background color for TextArea during certain
conditions (room is considered available)
lightRed
Color
Used as a background color for TextArea during certain
conditions (room is considered occupied)
nameField
TextField
Serves as a text box to hold user input for customer name
Nonsmoking
Checkbox
Serves as an option button for user to select nonsmoking as
smoking preference
numLabel
Label
Displays a Label prompt for input of the number of guests in
the party
numberOfGuests
Choice
Adds a drop-down list from 8 to 20 for the number of guests,
for user input
options
CheckboxGroup
Adds a logical grouping of option buttons: nonsmoking,
smoking, and hidden
phoneField
TextField
Adds a text box to hold user input for customer phone
number
room
Variable of type
Used to store data about the array of Rooms
(class) Rooms
roomDisplay
Array of type TextArea
Used to display data about the array of Rooms
roomPanel
Panel
Serves as a container to hold and position TextArea
components
Smoking
Checkbox
Serves as an option button for user to select smoking as
smoking preference
The Reservations class will use four methods to implement the interface.
Table 5-4 displays the methods of the Reservations class and their purposes.
 
Search WWH ::




Custom Search