CreateImage!!!

Hello all,
How does CreateImage work?Suppose i have got a JFrame visible at the moment.Is it possible to create the image of that visible Jframe so that later on i can draw this.
With regards
Priyan.T
ICQ:54490947
mail:priyan.thirithiyil@lisec.com
PriyanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

heyhey_Commented:
yes, it is possible :)
0
JodCommented:
:)
0
PriyanAuthor Commented:
hello all,
i think i should make my question a little bit more elaborate.What does createImage do,is it just creating a memory area which can be used for double buffering or will it actually returns an image of that component
if i have got a class extending from JFrame and if i write "Image img =this.createImage(this.getBounds().width,this.getBounds().height);" does it actually create the image of that component,so that later on if i use g.drawImage(img,.....)it will be visible.Please excuse me if you find this question a little bit odd!
With regards
Priyan :)
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

heyhey_Commented:
createImage() creates just another offscreen Image.
you can capture the JFrame (with all the lightweight UI) with

Dimension d = frame.getSize();
Image image = createImage(d.width, d.height);
Graphics g = image.getGraphics();
frame.paint(g);

you can use PixelGrabber to capture the color info from the image object, and you can use some GIF / JPEGEncoder to save it in standard format
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vladi21Commented:
0
PriyanAuthor Commented:
Hello,
Thanx heyhey for your help.
With regards
Priyan
0
PriyanAuthor Commented:
sorry for the points,it should have been 10.i didn't notice it.
rgds
Priyan.T
0
heyhey_Commented:
it's ok

I received 10 x 4 (grade A) points.
the question now worths 1 point (10 / 10) and everybody that wants to see the answer will have to pay 1 point :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.