Results 1 to 3 of 3

Thread: TextArea Bug?

  1. #1
    Soda is offline Member
    Join Date
    Dec 2007
    Posts
    15
    Rep Power
    0

    Default TextArea Bug?

    Whenever I size a textarea, the text does not display when I use either setText or append. This only happens when I specify the size of the textarea.


    JTextArea t = new JTextArea(50,50);

    t.append("Hello");
    ^ Code is something like that. Its suppose to display "Hello", but since I had specify the size, it wont display.

    Why is it like that? Is there a way to display it with a specified size for the textarea?

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

    Default

    Put your textArea inside a JScrollPane so it can be displayed at the size you specify.

  3. #3
    Soda is offline Member
    Join Date
    Dec 2007
    Posts
    15
    Rep Power
    0

Similar Threads

  1. TextArea with Unicode
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 04-16-2008, 10:53 PM
  2. How to get the position of character in TextArea
    By loganathan.lakshmanan in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 01-19-2008, 12:06 AM
  3. Replies: 1
    Last Post: 08-07-2007, 05:35 AM
  4. problems when I print in textarea
    By gabriel in forum New To Java
    Replies: 1
    Last Post: 07-26-2007, 06:57 PM
  5. textarea
    By ubuntu in forum AWT / Swing
    Replies: 4
    Last Post: 05-12-2007, 09:54 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
  •