How do I lock the mouse inside a JFrame

Posted by Jim on Stack Overflow See other posts from Stack Overflow or by Jim
Published on 2010-03-30T05:36:01Z Indexed on 2010/03/30 5:43 UTC
Read the original article Hit count: 351

Filed under:
|
|

Hello,

I would like to lock the mouse inside a JFrame. That is, the mouse can not leave the contents of the JFrame (unless the user hits escape, alt-tab, or the window otherwise looses focus). Ideas?

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about swing