my dog learned polymorphism
The moose likes Swing / AWT / SWT and the fly likes how to get image from JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "how to get image from JPanel" Watch "how to get image from JPanel" New topic
Author

how to get image from JPanel

Bobby Marvikuan
Ranch Hand

Joined: Mar 14, 2012
Posts: 54
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

Joined: Oct 27, 2005
Posts: 19216

How did you get it onto your JPanel? Is it an ImageIcon wrapped in a JLabel? Or did you create it in paintComponent?


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to get image from JPanel
 
Similar Threads
applet x/y coordinates
adding images to JPanel ***************URGENT
BufferedImage questions.
After screen Capture(to a Gif File)?????????
Writing Image onto a WordDoc