Image shows what getDisplayMedia() does

I want to show user, all the current opened applications/windows (like that of alt+tab) using java. In javaScript we can do this by Media Devices interface getDisplayMedia(). I want to implement similar feature using java.
Is there any way to do this using JNA, or something else.