title: Convert JPanel into png or other image file
body: <p>I have a JPanel that consists of a lot of JLabels. So there is no paint at all, just JLabels with different background colors and such. The JPanel is visible. </p>
  
  <p>How can I convert this JPanel to an image file? The image file would be a picture of the JPanel exactly as it appears on the screen. </p>
  
  <p>(Ideally, the program would create a .png, and save it to the same folder that the program is in or even a different folder chosen by the user.)</p>
  
  <p>Any advice would be appreciated. Thanks! </p>
  
  <p>---- It's Cherie again, unregistered so I couldn't get back into my account to choose stas's answer as the answer. This is why I'm not replying... anyway, thank you for your help. Cherie</p>