![]() So, by here, we had created a scrolling container. ![]() Now set this newly created JPanel object as the viewport of the JScrollPane container. ![]() Now create a new JPanel object with the BoxLayout set as having YAXIS orientation. Now set this JScrollPane as the basecontainer. The BorderLayout is used to arrange the components in five regions: north, south, east, west, and. One, but not both, of rows and cols can be zero, which means that any number of objects can be placed in a row or in a column. All components in the layout are given equal size. 前两种类似于军训的向左看齐、向右看齐,最后一种类似于照相时,以每排中间为基准,两边向中间靠拢。Ģ、hgap,控件之间的水平间距 ps. JScrollPane is the preferred scrollable container. The GridLayout class constructors Constructor Purpose GridLayout(int rows, int cols) Creates a grid layout with the specified number of rows and columns.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |