• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Word wrap in JTextArea

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it looks OK.
perhaps if you posted the entire applet code, we could run it and observe the behaviour
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
reply
    Bookmark Topic Watch Topic
  • New Topic