Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextPane/InputStream  RSS feed

 
cardwell cupp
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys! I am trying to turn the contents of a JTextPane into a inputstream. How would I go about doing this???
Thanks All
Cardwell
 
Rashid Ali
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you will have to get text from textpane like: textPaneRef.getTet() and pass it on to concerned subclass of InputStream, such as CharArrayInputStream etc... and can set your text into it.
You can learn how to apply it from an I/O Stream chapter of any java book.
Hope it helps.
Good luck
Rashid Ali
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!