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 / October 2004

Tip: Looking for answers? Try searching our database.

How to change JTabbedPane's size with Frame's size change

Thread view: 
Raine Wang - 13 Oct 2004 20:35 GMT
I met a problem on the GUI. I put a jTabbedPane in a jInternalFrame.
The jInternalFrame is contained at a main Frame. When the main Frame's
size is enlarged, I use jInternalFrame.setMaximize(true) to enlarge
the jInternalFrame. But the jTabbedPane's size is not enlarged with
the jInternalFrame's change.

The panel stucture of the jInternalFrame is
"contentPane(borderlayout)->jPanel(null)->jTabbedPane->jPanel(flowlayout)"

I spend hours on this one. this is so weird. I still think there is a
way
to resolve this issue.

Thanks for any idea. :D
Paul Lutus - 13 Oct 2004 22:24 GMT
> I met a problem on the GUI. I put a jTabbedPane in a jInternalFrame.
> The jInternalFrame is contained at a main Frame. When the main Frame's
[quoted text clipped - 4 lines]
> The panel stucture of the jInternalFrame is
> "contentPane(borderlayout)->jPanel(null)

What? JPanel(null)? This is the problem.

> ->jTabbedPane->jPanel(flowlayout)"
>
> I spend hours on this one. this is so weird.

It's not weird at all, You have a component in the chain without a layout
manager. This prevents the size change from propagating through to the
inner components. For simplicity's sake and until you start fine-tuning
your layout, use all BorderLayouts and put everything in the center.

Signature

Paul Lutus
http://www.arachnoid.com

Raine Wang - 15 Oct 2004 20:34 GMT
Hi Paul,

Thank you so much. The problem is fixed. :)

> > I met a problem on the GUI. I put a jTabbedPane in a jInternalFrame.
> > The jInternalFrame is contained at a main Frame. When the main Frame's
[quoted text clipped - 15 lines]
> inner components. For simplicity's sake and until you start fine-tuning
> your layout, use all BorderLayouts and put everything in the center.
Andrei Kouznetsov - 15 Oct 2004 16:33 GMT
> I met a problem on the GUI. I put a jTabbedPane in a jInternalFrame.
> The jInternalFrame is contained at a main Frame. When the main Frame's
[quoted text clipped - 7 lines]
> way
> to resolve this issue.

the right way is:
contentPane(borderlayout)->jTabbedPane->jPanel(flowlayout)

Signature

Andrei Kouznetsov
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities



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



©2008 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.