title: Swing Scala Question - 100% expansion of panel
body: <p>Even though the code is scala, you can see the swing oriented approach.  I just want to add a text area to a panel(core) and associate panel(core) with the frame.  I want panel core and the text area to fill out 100% in the width and the height.  Basically, I just want a text area shown.  With this code, I can sort of see the textfield but is it.  The width looks like it is only 1 pixel.</p>
  
  <p>Possible Solution?  should I find a way to add a layout to the frame?  Which layout?</p>
  
  <pre><code>import java.awt.{ Insets, GridBagConstraints, Dimension }
  import javax.swing.{ JPanel, JScrollPane, JTextArea }
  import scala.swing.Swing._
  import scala.swing.{ MainFrame, Panel, SimpleSwingApplication }
  
  object LogAnaylyzerMain extends SimpleSwingApplication {
  
    def maxWidth = 900
    def maxHeight = 600
    def initXPos = 320
    def initYPos = 260
  
    /**
     * Core Panel Content.
     */
    object coreContentPanel extends JPanel {
  
      val outputTextArea = new JTextArea
      val outputTextScrollPane = new JScrollPane(outputTextArea)
      this.add(outputTextScrollPane)
    }
  
    class outputTextArea extends JTextArea {
      this.setLineWrap(false)
      this.setCaretPosition(0)
      this.setEditable(true);
    }
  
    /**
     * Main Frame, entry point.
     */
    def top = new MainFrame {
      peer.setLocation(initXPos, initYPos)
      title = "JVM Log Analyzer"
      contents = new Panel {
        preferredSize = (maxWidth, maxHeight)
        focusable = true
        peer.add(coreContentPanel)
        pack()
      }
    }
  
  } // End of the Class //
  </code></pre>