I have a JFrame, on it are several JComponents and one of the components (say MyComponent) is where things get drawn. How can I save what is drawn on this image onto a file. I've been told that a BufferedImage is what I need, but how exactly can I do it. I did try looking at some questions on BufferedImage and it only got me confused.
I only want the code that saves MyComponent into an image file so that I can study and experiment with it.
Aucun commentaire:
Enregistrer un commentaire