Results 1 to 2 of 2
  1. #1
    newtojava7 is offline Member
    Join Date
    Jan 2008
    Posts
    16
    Rep Power
    0

    Default JTextArea setting

    Hi,

    Right now I have a JTextArea, I want to put a paragraph in it. At first it was just displaying the paragraph with one line in the JTextArea, and created scroll bars. I fixed that and got it to jump to the next line once a line in the JTextArea ran out of space.

    However now it is cutting off words, say I have the world "black" at the end of the line where it runs out of space, it prints "bl" in the first line and then continues with "ack" at the beginning of the second line. How can I fix this?

    Thanks for your time.

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    Java Code:
    textArea.setLineWrap(true);
    textArea.setWrapStyleWord(true);

Similar Threads

  1. Setting the DSN
    By tim in forum JDBC
    Replies: 1
    Last Post: 02-14-2008, 09:55 PM
  2. Help with setting up Java
    By itmasterw in forum New To Java
    Replies: 6
    Last Post: 01-18-2008, 11:04 PM
  3. Help with setting up please
    By BlitzA in forum New To Java
    Replies: 6
    Last Post: 12-29-2007, 12:54 PM
  4. Setting cookies in JSP
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-10-2007, 05:33 PM
  5. Setting currency
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-16-2007, 02:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •