JSplitPane resize problem
I'm using the UI designer and I have a JSplitPane that refuses to size itself correctly. I haven't worked with split panes in Swing very much in the past and I don't know whose fault this bug is - mine, IDEA's, or Swing's.
My problem is, I have a JSplitPane, and if I add it to my JFrame's content pane as the only item, it does not resize to fill the whole frame. It is set to "fill: both" and all 3 checkboxes are checked in both the horizontal and vertical size policy.
If I place it in a panel, then place the panel in the JFrame, it doesn't work either.
Does anyone know why this would happen? Should I file an IDEA SCR about it?
Please sign in to leave a comment.
I just noticed that it does resize properly in the Form Preview.
Okay, I see now that the problem isn't related to it being a JSplitPane, but I still don't know how to fix it.
The problem is that I have ImWindow.form and ImBox.form. ImWindow is a JFrame, and it has a tabbed pane in it. Instances of ImBox (a JPanel) are added to the tabbed pane in ImWindow.
You can't bind a component to "this," so what I do is I have an initializer block that calls { add(mainPanel); } in ImBox.
Does anyone know why this would result in the sizing policy being ignored?
Thanks.
On Thu, 22 Jan 2004 22:40:54 +0000, Keith Lea wrote:
One problem I'm seeing the JSplitPane's is that sometimes if I delete an
object from the bottom/right pane, the splitter goes to the bottom/right,
and I'm unable to insert an object into the panel :(
--
Discouragement is a dissatisfaction with the past, a distaste for the
present, and a distrust of the future - Maree De Jong, CLCA.