Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing a JPanel



First, you probably need to create an instance of BufferedImage and then have your Panel paint itself into this new image. Then try to print the Image.

Something like:

BufferedImage theImage = new BufferedImage(thePanel.getWidth(), thePanel.getHeight(), BufferedImage.TYPE_INT_RGB);
thePanel.paint(theImage.getGraphics());
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.
References: 
 >Printing a JPanel (From: Jonathan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.