Java programming screenshot (screenshot) code summary
•
Android
This paper summarizes the common screen capture methods of Java programming. Share with you for your reference, as follows:
Method 1:
Method 2:
Method 3:
Because it is minimized to the system tray, you still need a tray icon named bg.gif. The picture should be placed in the same level directory, otherwise the null pointer will be abnormal.
The main screen capture code is:
(source code from CSDN)
I hope this article will be helpful to you in Java programming.
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码