This content has been marked as final. Show 3 replies
Don't create a screen capture. Construct a BufferedImage the same size as the panel and of an appropriate type, obtain its Graphics and call paintComponent(...) of the panel with the Graphics of the BufferedImage. This paints the panel to the BufferedImage.
Moving to Java2D for better topic alignment.