Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / November 2003

Tip: Looking for answers? Try searching our database.

Issue with JTabbedPane Resizing

Thread view: 
Mike - 20 Nov 2003 03:19 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.

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.