Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC 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 ...
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Printing Embedded JComponents  RSS feed

Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I have a JTextPane with an embedded JLabel and i am trying to print the contents of the JTextPane. When i print it an exception gets thrown saying that there is an error in the views.

This only happens if i have an embedded jcomponent in the jTextPane but other than that it prints fine with no problems. I thinking i have done something wrong with the views and have tried manipulating but nothing seems to work. I not really sure what i am doing wrong so i am listing a runnable example so you guys can run the program and see what i mean.

I am using the default styled document together with rtf editor kit and the content of the JTextPane is set to rtf.

It seems that i can print everthing else including embedded images and rtf text except an embedded jcomponent and maybe someone could have a look at my code and see what i am doing wrong and help me
print multi-page embedde jcomponents in the JTextPane

I hope someone can help me with this problem

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!
how do I do my own kindle-like thing - without amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!