Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Printing JTable with Renderers

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to print a complex JTable with JList and JLabel table cell renderers. The code to handle the actual printing works fine, but previewing the table causes an OutOfMemoryError exeption. The same code for the preview works fine for tables without renderers. Any Ideas?
Thanks,
Jeremy
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try the wanderful solution provided by http://www.activetree.com for free to print complex customer rendered JTable. It prints as well as generates PDF files for Swing components such as JTable, JTextArea, JEditorPane, JTextPane, any kind of JTextComponent. Also prints J2EE program output by automatically formatting to page with line and column breaks.
You can actually run the online demo from this website.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!