You want to make a bitmap of screen ?
if yes, then try this code.
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension screenSize = toolkit.getScreenSize();
Rectangle screenRect = new Rectangle(screenSize);
// create screen shot
Robot robot = new Robot();
BufferedImage image = robot.createScreenCapture
(screenRect);
// save captured image to PNG file
String imageFileName = File.separatorChar
+ "Automation" + File.separatorChar + outFileName ;
ImageIO.write(image, "png", new File(imageFileName));
// give feedback