varun dangi
varun dangi

Reputation: 19

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);

Upvotes: 0

Views: 1223

Answers (1)

Mohammed Shareef C
Mohammed Shareef C

Reputation: 4050

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.

Upvotes: 0

Related Questions