Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to stop Parent layoutBounds from growing as child nodes are added?

875886Jul 15 2011 — edited Jul 18 2011
I suspect there is something simple here that I'm missing... Can anyone tell me how to define a Parent with fixed bounds for layout purposes, and not allow those bounds to change unless I change them explicitly/programmatically?

Most importantly, I don't want the bounds of the Parent to grow if a child is added which extends beyond the bounds that I've set.

I've found that I can add a "clip" to the parent and the child itself will be visually clipped at the correct place. However, the Parent bounds still grow, which causes the layout of the Parent to change within its own Parent.

Another way of stating the problem might be: How can I force the layoutBounds of a Parent to always match whatever "clip" I specify on the Parent?

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2011
Added on Jul 15 2011
4 comments
380 views