• Post Reply Bookmark Topic Watch Topic
  • New Topic

help on refereshing

 
catherine matthews
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need to refresh a Jtext Area everytime a new file is being selected.
how do i do that?
please help
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A call to setText, append or read will usually update a JTextArea right away. If you want to clear it you can use textArea.setText("").
 
shansi raj
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
refresh(){
textArea.setText("");
}
Call this method before appending any text to the area.

textArea.setText("Some text");
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!