This is a class which is used to generate pdf. But actually it is storing in a particular hard disk location. My requirement is "it has to display on the screen" and it should store in database also. waiting for your valueable suggestions.
You'll need to turn it into a Swing application (maybe SWT will also work) and find a component to show PDF files (or write one). This can be a simple wrapper around Acrobat Reader or a native PDF viewer, both are possible.