Java: Is it possible to take a GUI Panel and output it into a picture?

Posted by user369748 on Stack Overflow See other posts from Stack Overflow or by user369748
Published on 2010-06-17T20:10:17Z Indexed on 2010/06/17 20:23 UTC
Read the original article Hit count: 151

Filed under:

So I have this chart that's a little special. Kind of like an XY plot of points but my boss wanted to look like a bunch of boxes rather than dots connected by lines. And I basically made a chart using gridlayout and a whole bunch of cells that I'll be colouring in black or white depending on the data.

Now he sorta wants it to be outputted to a image file. Is there any way to save a Panel into a picture? He wants to display not only the data but also save a visual representation of the data into an image file.

© Stack Overflow or respective owner

Related posts about java