如何使用各种布局管理器

原文: https://docs.oracle.com/javase/tutorial/uiswing/layout/layoutlist.html

以下每个页面都介绍了如何使用特定类型的布局管理器。另一种访问这些页面的方法是通过布局管理器的可视指南


Note: This lesson covers writing layout code by hand, which can be challenging. If you are not interested in learning all the details of layout management, you might prefer to use the GroupLayout layout manager combined with a builder tool to lay out your GUI. One such builder tool is the NetBeans IDE. Otherwise, if you want to code by hand and do not want to use GroupLayout, then GridBagLayout is recommended as the next most flexible and powerful layout manager.


如果您对使用 JavaFX 创建 GUI 感兴趣,请参阅在 JavaFX 中使用布局。