更新时间:2023-12-05 08:38:52
这是一个很棒的教程,介绍如何在不使用布局管理器的情况下对组件进行布局.
Here is a great tutorial on how to layout your components without using a layout manager.
http://java.sun.com/docs/books/tutorial/uiswing/layout/none.html
在没有布局管理器的情况下创建容器涉及以下步骤.
Creating a container without a layout manager involves the following steps.
setLayout(null)
将容器的布局管理器设置为null. setbounds
方法. repaint
方法.setLayout(null)
.setbounds
method for each of the container's children.repaint
method.