The swap won’t necessarily be only used when your RAM is full (at least not on Ubuntu using the default settings).
You can change the tendency of the kernel to use the swap using the swappiness setting as described here 8 (scroll down to swappiness).
These settings might be OS dependent, so I’m not sure how other Linux distributions handle it.