Does "box" mean the same thing in these two sentences?

An armed guard sat in the box with the driver.

The flowchart contained many boxes.
different meanings