Java- screen capture behind the application

前端 未结 3 1569
不思量自难忘°
不思量自难忘° 2021-01-24 12:55

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

相关标签:
3条回答
  • 2021-01-24 13:12

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

    0 讨论(0)
  • 2021-01-24 13:31

    i think screencast o matic does just this?

    0 讨论(0)
  • 2021-01-24 13:38

    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.

    0 讨论(0)
提交回复
热议问题