To create a swap (or any) partition on a disk, none of the disk's partitions can be mounted. Boot from a Live Cd, or your installation medium in "Try Ubuntu" mode.
Run gparted, make sure (in the upper right corner of gparted's screen) you're manipulating the correct disk.
Use gparted to move/resize partitions to create available space as big as you want your swap to be.
Create a partition in the available space, format it as 'swap'.
Boot back into your normal system.
Use blkid to find the UUID, read man fstab to see how to add swap to /etc/fstab.
Then swapon your new partition,
swapoff and rm your swapfile.