Click here to Skip to main content
15,440,771 members
Articles / Desktop Programming / System
Posted 6 Jun 2013


10 bookmarked

Virtual Screenshot Manager

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
7 Jun 2013CPOL1 min read
Captures, searches, and manages all your screenshots in one place.


Screenshots are an important way to store important information for future reference. This is easy until the time we have a small number of screenshots. But when you have a large number of screenshots, you would probably like to manage them and find a way to search out any of your screenshots by a simple search. Virtual Screenshot Manager makes this possible.


Using the Code

We will now discuss the important part of coding . We start with the main functionality, i.e., capturing the full or cropped screen.

Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
Robot robot = new Robot();
BufferedImage img = robot.createScreenCapture(new Rectangle(size));

Here we take a screenshot. The portion for which we take a screenshot will be described by the var

Now when we have made a screenshot, we save it to a predefined location.

File save_path = new File(imgPath+"1.jpg");
ImageIO.write(img, "JPG", save_path);

Now this image will be saved. When you save the next image, you update the counter so that the next one gets saved as 2.jpg.

Next, we open a popup asking to enter information about this screenshot which we may use to search the image later.

We write all screenshot information as below:

FileOutputStream fout = new FileOutputStream("ImageInfo.dat");
ObjectOutputStream oos = new ObjectOutputStream(fout);

Here, imd is an object which contains information about the cropped image. We write this inside a serialized class which we can later read to either display or search the screenshot.

Now to show images, we use:

list1 = new JLabel(new ImageIcon(Img + ".jpg"));

This will display a new screenshot. Likewise, we may show the remaining screenshots. For my software, I am numbering the screenshots.

For searching, we give a search term and use it to check the dat files.

Points of Interest

I learned how easy it is to learn NetBeans and it can do wonderful things. This is all from my side for now. Please let me have your valuable feedback.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Software Developer (Senior)
India India
I am a Java software developer. I like to make new software which can be helpful to people. You may get in touch with me at

Comments and Discussions

GeneralMy vote of 5 Pin
Gun Gun Febrianza7-Jun-13 18:41
Member Gun Gun Febrianza7-Jun-13 18:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.