My application has a java JComponent where some strings and lines are drawn using the drawString(theStr, xPos, yPos) and drawLine(x1, y1, x2, y2) methods in Graphics2D class. I am able to get this using the createImage(width, height) method in the Component class. This is working fine as long as my JComponent is visible. My requirement is to create the image of the JComponent when it is NOT displayed / visible.
please help me on this issue.