title: How to set JTextArea to fixed size
body: <p>I have a JTextArea inside a JPanel. The JPanel is set to the default FlowLayout.</p>
  
  <p>I assigned to the JTextArea a size through the constructor: <code>new JTextArea(50,50)</code>.</p>
  
  <p>However, not only the size I specified is ignored once it's out of a certain range (for example, if I set the size to a value larger than 40*40, the program starts to ignore what I say and instead set the JTextArea to some arbitrary size) - the size also changes as I type. The JTextArea resizes itself if I type inside it more than it can contain.</p>
  
  <p>I did:</p>
  
  <p><code>textArea.setLineWrap(true);</code></p>
  
  <p>Didn't solve this.</p>
  
  <p>How can I set a fixed size for the JTextArea?</p>