This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on StyledDocument.  RSS feed

thejaswini ramesh
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
My application consists of a simple GUI with a textField, a button and a textpane.The requirement is tht user types a command and hits the button upon which the command and response from a remote element should be logged in the textPane.Also after each cmd + response, the screen should be cleared and new set of cmd + resp should be logged when new cmd is entered.
I have used the following:

But now the cmd + resp are logged one after another as opposed to the textPane being cleared after each set.I even tried using remove() mthd from document to remove a portion of the document.Can someone tell me a simpler mthd to do this...?Also can i use a textArea instead of textPane without the StyledDocument??Will this help??
Thanks in Advance,
[ February 12, 2006: Message edited by: thejaswini ramesh ]
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!