Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Word wrap in JTextArea

 
Flo Powers
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am in the process of learning about Swing and have a question regarding the use of JTextAreas. I searched this thread for previous posts on the topic but didn't find anything that solved my problem.

The below code works fine in the appletviewer, but not when embedded in a web page. That is, the inputdialogs work but not the messagedialog, and the text in the outputArea only shows the last word in input.



The messagedialog was just there to test that it was actually inputting the text correctly, but it doesn't actually show when viewed in the web page, so I thought I'd inquire about that as well.

Thanks!
[ October 20, 2005: Message edited by: Flo Powers ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it looks OK.
perhaps if you posted the entire applet code, we could run it and observe the behaviour
 
dave taubler
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your subject title mentioned word wrap, so I assume you're having some issue with that. Try including

outputArea.setWrapStyleWord(true)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic