Sounds more like a virus of some kind.
Why not just create a JWindow, rather than a JFrame, so that they can't exit it (unless via Task Manager).
Anyways, back to the "restart" part. It depends...
The best choice is to use JNI. However, if you're on a windows 2000+ machine, then you can use the shutdown.exe file in the %SystemRoot%.
Type at command prompt: shutdown /? for all the parameters,
But, what you want is:
shutdown -r -t 00 -f
Then got:
www.javaalmanac.com and search for "command", and you will find some code under one of the links on how to run a program.
[r.D]