Are you running parted from a live CD/USB or from within Ubuntu? The filesystem must be unmounted to make changes.
Here is how the partitions line up in order. Assuming your running an ext3/4 filesystem you can easily gain more space by reducing reserved space then by trying to get that 1mb of free space. You can reduce swap and then enlarge sda6 if you do not need that big of a swap partition.
Code:
sda1
sda2
free space ~500mb
sda4 extended
free space ~1mb
sda6 (linux /)
free space ~1mb
sda5 (swap)
sda3