This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get image from JPanel

 
Bobby Marvikuan
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, as I understood(may be not correctly) in order to save an image I need a bufferedImage to read from some image like

or

but if I don't have an image I mean I have it but on my JPanel and it is exactly the image that I want to save how can I do then???
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How did you get it onto your JPanel? Is it an ImageIcon wrapped in a JLabel? Or did you create it in paintComponent?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic