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!

Flowlayout.center with vertical alignment

843807Jul 12 2010 — edited Jul 12 2010
I have:
jPanel1.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));
jPanel1.add(jPanel2);
jPanel1.add(jPanel3);

The height of jPanel2 and jPanel3 are different. Horizontally, it looks fine. Vertically, by default it aligns center as well, how can it change the vertical alignment to top and keep the Horizontal alignment as center?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 9 2010
Added on Jul 12 2010
4 comments
953 views