Well, you are going to have to talk to the operating system to get that done. Something Java does not like to muddle in. You will probably need to do it in C and then use some JNI to integrate it into your Java program. Of course first you have to decide WHICH operating system that you are going to write it for and figure out how to manipulate it.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Not so fast naughty spawn! I want you to know about
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop