How to position/lock mouse?

I’m working on an FPS game with mouse support. Mouse control works good. But I have a problem: if I move the mouse outside the applet, it obviously stops working.

Is there a way to position the mouse back to the center of the applet? Or can I handle mouse events differently?

So far I’ve only found the Robot solution, but that’s not the perfect solution, and it also requires permission.

Having an unsigned applet being able to seize control of the pointer without warning is a pretty huge security risk, so I’d be surprised if there was a way without signing.

Could you offer fullscreen mode and apologise to those for whom it doesn’t work? It’s far from perfect, but when it works it’s an elegant solution.