Measure the door and subtract an inch to two inches from the length and width, depending on how much of a lip you want the table to have.
Cut the 2x4's to build a frame that will be slightly smaller than your table measurements.
Measure this frame and have a sheet of plywood cut to match it.
Screw the frame of 2x4's together securely.
Apply wood glue to the top of the frame and place the plywood sheet on top. Allow to dry.
Pre-drill a hole into each corner, making sure to drill through both the plywood and the frame.
Screw in the table legs.
Flip the whole thing over and stand it on its legs.
Attach the piano hinge to the top of the frame, and attach the other side of the hinge to the door. You can use a French door, a vintage door with a window in it, or a regular wood door - just make sure it's built for use outside, or you could end up with warped wood.
Sand the door, frame and legs with fine-grit sandpaper.
Stain or paint the door as desired.