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

Flushing text written to JTextPane  RSS feed

 
Chris Brat
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a screen with a textpane. The screen allows the user to make some selections, then does calculations and is supposed to displays the status of these calculations.
Unfortunately the calculations complete and the screen closes before the output is displayed in the textpane.
Is there some was to flush output to a jtextpane immediately (sort of like System.err)?
Thanks in advance
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is the screen closing? If this is something that you have programmed your app to do why not just have it not close the screen?
 
Chris Brat
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply,
this is for an exercise in the course I am studying and it is one of the requirements that the screen show live feedback as it happens and then closes immediately once the actions are completed (its actually displaying information about the creation of a socket and streams to a server).
I've already sent in my project as best as I could manage - now I want to know if its possible because its bugging me ;-)
Thanks in advance.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at this post... Maybe this would have worked with multiple threads...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!