So I started working on the front end of a little application today. This is my first foray into Swing. I haven't ventured into GridBagLayout just yet, but I know it is coming soon. One of the problems that I just solved was a JTextArea was not filling the JScrollPane. So, after a couple of hours of searching JavaDocs and talking to friends and scratching my head, I decided to resort to an old HTML trick: Make the borders viewable. So, I started setting borders to pink (this ensures that they don't stay that way :) and on my first try I found the problem. I was putting the panel into the NORTH section of a BorderLayout. So, I put the panel into the CENTER section and now everything is working as expected.
Like I said in my third sentence, GridBagLayout is in the near future. But I will probably enlist the help of Packer a nifty little tool that simplifies life with GridBagLayout. Thanks to Ben Galbraith for the pointer.
Posted by carl at July 14, 2004 01:31 PM
Comments