简体   繁体   English

我如何使用LayoutManager来获得这样的布局?

[英]How would I use LayoutManager to get a layout like this?

So, I'm totally new to LayoutManager. 所以,我对LayoutManager完全不熟悉。 I've already read about the existing LayoutManager but don't which the best is to get a Layout like this. 我已经阅读过有关现有LayoutManager的信息,但最好是获得这样的布局。 The different colorboxes represent JPanels. 不同的颜色盒代表JPanels。

在此输入图像描述

Which one should I use? 我应该使用哪一个?

您可以使用JGoodies的FormLayout

可以使用具有两个垂直组和两个水平组的GroupLayout来实现该布局。

See How to Use GridBagLayout . 请参见如何使用GridBagLayout

  1. Red is displayed at its preferred size. 红色以其首选大小显示。
  2. Blue is filled horizontally 蓝色水平填充
  3. Green is filled vertically 绿色垂直填充
  4. Cyan is filled vertically and horizontally. 青色垂直和水平填充。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM