The side length of each square in the table.
table
public Table table
The reservation table.
rows
private int rows
The number of rows in the reservation table.
cols
private int cols
The number of columns in the reservation table.
markList
private Vector markList
A list of squares that were marked in the reservation table.
name
private String name
The name of the reservation table
Build a table with the specified name, rows, and cols.
Returns the actual size of the panel.
unmark
public void unmark(int row, int col)
Removes the mark in the reservation table at the location specified by the method parameters.
mark
public void mark(int x, int y)
When the user clicks on one
of squares in the reservation table one out of two things can happen.
1. If the square already
has a X on it then the X is removed.
2. If the square is empty
then a X is placed in the square.
paint
public void paint(Graphics g)
This method is responsible
for the actual drawing of the reservation table and Xs.