V
V
Valera Programmer2016-10-12 15:33:47
Java
Valera Programmer, 2016-10-12 15:33:47

How to take a screenshot of a specific program in java?

You need to programmatically take a screenshot of any running program as in windows Alt + PrintScreen, I will be glad for any hint)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Chvalov, 2016-10-13
@noddux

Get coordinates of a third party window - stackoverflow.com/questions/6091531/how-to-get-the...

M
Mercury13, 2016-10-12
@Mercury13

colororacle.org
Here is an open source color blindness simulator in Java. Takes screenshots of the entire screen; how - look at the source.
It is doubtful that it will be possible to take a snapshot of a separate program cross-platform in Java - it hurts too much for a system thing.
PS For screenshots, a class called "testing robot" is used - they can take a screenshot, but how to get a rectangle of someone else's window? Apparently, only through the native wrapper.
PPS It turns out that there is a native wrapper - JNA. Never worked with her.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question