However, there is more to this process.
This page should continue to explain the next step.
You need to mount the disk image that is being created and then bring your desired files into the mounted .dmg.
Failure to do this, will created an empty password protected dmg.
I was confused by this since I thought something was wrong with the steps I took to create my file.
I didn't know that the process continued further.
OS X Mountain Lion (10.8)