I have an application that has 3 JScrollPanes (viewing 3 JTables) and
a title for each table displayed in a tabbed pane (it is basically a
summary tab). The JTabbedPane is in a JFrame.
My problem is that I build a JPanel that has my 3 tables and 3 titles
(JLabels) in it and then I add a tab with the JTabbedPane.add("my
tab", myJPanel) method.
When I resize the JFrame, the JPanel in the JTabbedPane does not
resize at all. The only way I can get components to resize correctly
in a JTabbedPane is if I add the component with tabbedPane.add("my
tab", myJComponent);
What am I missing that will let my JPanel (and the stuff in my JPanel)
resize correctly when the JFrame is messed with?
Other things of note:
I am using GridBagLayout in the JPanel. I believe that I am using it
correctly with weights set and fills set.
Any hints would be appreciated.
-Mike
Andrew Thompson - 20 Nov 2003 05:56 GMT
> I have an application that has 3 JScrollPanes (viewing 3 JTables) and
> a title for each table displayed in a tabbed pane (it is basically a
> summary tab). The JTabbedPane is in a JFrame.
Have you got a short, self contained, compileable
example of this behaviour?
[ Please do _not_ dump your current 22K of code
that refers to
- custom classes not included '..but they are fine...'
- external resources ]
--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site