Does the word "top" have the same definition in the next two sentences?

Only the top side of the box was painted.

He stared as she buttoned her top.
different meanings