setBounds() public void setBounds(int x,int y,int width,int height)移动组件并调整其大小。 由 x 和 y 指定左上角的新位置,由 width 和 height 指定新的大小。 前两个int 是矩形组件左上角那个点在容器中的坐标。 后两个int 是矩形组件的宽度和高度。 参数的含义: x - 组件的新 x 坐标。 y - 组件的新 y 坐标。 width - 组件的新 width。 height - 组件的新 heigh。