This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In regards to those, is it possible to print a JEditorPane without it being added to a JFrame?
Later in my program I want to be able to print a JEditorPane without displaying it in a UI, however I found that it would only print once it had been added to a JFrame and the pack() method had been called.
Joined: Dec 01, 2009
You should set size for the JEditorPane to let it layout. Also some changes of content layout are done only during paint (e.g. components of HTML location).
You can try to use invisible frame. Just create it and pack() but set location out of screen.
Joined: Apr 06, 2010
Thanks for the reply,
Yeah that's what iv ended up doing. Thanks for your help
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com