Possible Duplicate:
Using Swing with a framebuffer
I've been searching all day for solutions in various directions to my problem. I'm working on Java running on the Kobo Touch, and I'd like to use Swing to render the components. The problem is, if I simply call paint() or its friends, the component in question will only render itself. If I use a JFrame to pack() the components, then it works on the desktop, but when I move it to the Kobo it fails because the Java environment is headless there.
In a headless environment, what is the simplest way to render a JPanel with children into a BufferedImage or Graphics2D?