Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nested panels & gridbaglayout

Status
Not open for further replies.

kohinoor2007

Programmer
Mar 21, 2007
69
DE

Hi all,

Iam using gridbag layout and have run in to problems.

The following is my scenario:

My top level container is a JFrame.
To the JFrame,I have added a Jpanel & made it the content pane of the JFrame.
For the panel,I have used the GridBagLayout.

Now to the panel,I have added a toolbar and a splitpane(top level).

The splitpane is a nested pane with another splitpane inside & another component.

My questions ,here are

[1]As a rule ,is it recommended to set a min size,max size & a preferred size for each of the component or container put in the contentpane.

[2]I have provided the gridconstraints only for the toolbar & the toplevel splitpane.Is that sufficient or is it necessary to provide it for all the other containers & components as well.

for eg:- in the above said toolbar,Iam adding some buttons.I havent set any layout for the toolbar, co's the containing panel is set with the gridbaglayout.Is that sufficient .If not,what is the right thing to do...

Its really difficult to explain it in words.I have developed a quick & dirty application depicting the above behaviour.

Would be nice,If I could send the application to any one of you....Would appreciate it very much...

Thanks.......
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top