This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
sweet hello to all, someone tell me that how can i capture the active screen(window) using java. I have captured whole screen with createScreenCaputre() method. Now, i want to capture active window only. How to do it waiting . . . best wishes waqas dar
If that screen is part of your own application it's quite easy. However, it probably isn't, so I doubt there is anything you can do without using JNI, because you'll need to use the Windows / Xorg / XFree API.
You forgot the parentheses after getScreenSize. Also note that the method is part of the Toolkit class, so unless "this" is a Toolkit implementation -and I'm certain that it is not- it won't work the way you currently have it. The other discussion actually lists the code required - why don't you just copy and paste it?