Determine the size of MDF boards you need to make a cube in the size you desire. Take the 1/2-inch board width into account. For example, for a 12-inch-square cube that's 4 inches deep you need a pair of 12- by 4-inch boards and two 11- by 4-inch boards for the sides, plus a 12-inch-square board for the back of the cube.
Measure the MDF pieces you need for your cube using a straight edge, measuring tape and pencil. Cut the boards using a table saw.
Lay out the cube. For a 12-inch cube, stand the 12- by 4-inch boards on their long ends, parallel to each other, on your work surface. Complete the square by standing the 11-inch pieces on their long ends between the 12-inch boards. The 1/2-inch edges flanking the 11-inch boards add the extra inch needed to make the box 12 inches square.
Apply a bead of wood glue to the short edge of one of the 11-inch boards. Adhere the 11-inch board to its adjacent 12-inch board. Continue gluing the remaining three corners.
Slide the framing clamp over the cube. Tighten the clamp to hold the cube’s sides firmly together. Allow the glue to dry according to the manufacturer’s directions. Remove the framing clamp.
Stand the cube on end. Nail the boards together by driving four brad nails into each end to reinforce the glue. Nail the remaining three corners.
Lay the cube on your work surface, face down.
Apply a bead of glue around the edge that’s facing up. Place the 12-inch-square board on the cube. Adjust, if necessary, to make sure it fits perfectly. Fasten the board to the cube by driving brad nails every inch or two around the perimeter of the back.
Use a stud finder to locate the stud in the section of wall where you want to hang your cube. Find two adjacent studs if your cube is 16 inches or wider. Your studs are likely 16 inches apart.
Determine where the stud or studs will be positioned behind the cube. Mark the stud locations on the cube. Drill pilot holes through the back of the cube using a drill and drill bit. This will make it easier to drive screws into the studs to fasten the cube to the wall. Drill at least two pilot holes, one above the other and spaced several inches apart, if the cube will hang on one stud. Drill at least one pilot hole for each stud if the cube spans two studs.
Position the cube on the wall. Drive screws through the pilot holes and into the studs using the drill and a screwdriver bit.