如何在Java应用程序运行时阻止键盘和鼠标的输入.就像我们使用BlockInput(1)阻止AutoIt中的输入一样,我也想在Java中做同样的事情.
我只能回答挥杆申请.对于你的主框架你应该有这个
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
//or if you are using awt
Frame frame = new Frame();
frame.addWindowListener(new WindowAdapter() {
// handle the window closing event here
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3723 次 |
| 最近记录: |