简体   繁体   中英

How to Hide window Taskbar while taking Screen Shot using JAVA

I am using below code for screen shot but i want to hide window taskbar only. Is there any specific code for that without enter the dimension. I don't want enter dimension because every PC has different.. Please Suggest. Thanks in advance.

Robot robot = new Robot(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Rectangle captureRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()); BufferedImage screenFullImage = robot.createScreenCapture(captureRect);

I think you should do some pixel manipulations. Take a screenshot, start looking from bottom for the first row in which every pixel in it is different from the pixel in the same column but in the upper row.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM