Java- screen capture behind the application

亡梦爱人 提交于 2019-12-13 02:02:34

问题


Is there a way to capture the screen but without the app itself getting shown. I know how to minimize or make a frame invisible but this has to be done real fast cos it's going to happen alot in each second (at least once every second). I want it to look something like the magnifier in Windows Vista/7. (The app can see behind itself.)


回答1:


This is not possible in Java without tight native integration with the window-manager of the platform in question.




回答2:


Call setVisible(false) on your main JFrame before capturing the screen. When the screen capturing process is finished, call setVisible(true) to get your GUI showing up again.

To capture the screen, you can use the Robot class. It contains a createScreenCapture method that receives rectangle coordinates which will be captured in a BufferedImage.




回答3:


i think screencast o matic does just this?



来源:https://stackoverflow.com/questions/2782200/java-screen-capture-behind-the-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!