Results 1 to 2 of 2
  1. #1
    itaipee is offline Member
    Join Date
    Dec 2008
    Rep Power

    Default Constant size for JTextArea

    I use JTextArea for output apliication. However, large numebr of lines cause it to strech and and all my JPanel design is destroyed.

    Can I set a constant size - and add scroll bar ?

    if not what application should I use instead


  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    I hope you are using a visual designer, like Matisse, to do this...

    Generally, you put components like that in a JScrollPane, and you then set the preferred size of the scroll pane. That provides a fixed viewport, with scrollbars, over the component it contains.

Similar Threads

  1. JTextArea setting
    By newtojava7 in forum New To Java
    Replies: 1
    Last Post: 01-29-2008, 02:57 AM
  2. How to add a shortcut key from JTextArea
    By sukatoa in forum Advanced Java
    Replies: 2
    Last Post: 01-28-2008, 08:39 AM
  3. JTextArea
    By saytri in forum New To Java
    Replies: 0
    Last Post: 01-13-2008, 01:07 AM
  4. Jtextarea and scroll
    By ziniestro in forum AWT / Swing
    Replies: 2
    Last Post: 06-01-2007, 03:59 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