Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Pasting into a JTextPane  RSS feed

 
Julia Reynolds
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I have a bug! We have a word processing applet with a JTextPane
using DefaultStyled Document and rtfeditorkit. When I copy text from MS Word and paste it into the editing pane of my applet, certain characters like quotes and apostrophes are not recognized by the JTextPane and are rendered as little squares.
How can I fix this?
TIA, Julia
 
Julia Reynolds
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved this problem:
Microsoft word has settings in Tools>>AutoCorrect>>Auto Format As You Type>>Replace As You Type
for default options called "Smart Quotes" and "Symbol Characters".
These options need to be UN-selected, as they cause Word to replace
ASCII characters with some funky Word Symbol that does not render correctly in the JTextPane.
Julia
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!