There is no such thing as a header file in Java; you only get them in C and C++. Whenever you use a class you have to import it; you might draw on a JPanel inside a JFrame using Graphics so you would have to declare imports for javax.swing.JPaneljavax.swing.JFrame and java.awt.Graphics. If you go to the API for the paintComponent method you see it has a link to Graphics, so you know you need to import Graphics; if you click on the link you see which package it is in. If you can't work that out from the link name, you open the Graphics page and at the top left it says "java.awt" then Graphics, then an inheritance tree with java.awt.Graphics underneath java.lang.Object; you can use both of those to work out that its fully-qualified name is "java.awt.Graphics." If you use a changeBackground call in your drawing, you can use a similar technique to find out how to import Color.
I didn't notice he was using Eclipse. I usually write the first few letters of the class name, push ctrl-space, and select the class from the drop-down list which appears. That imports the class automatically.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com