免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Commonly used layouts
- [Instructor] Let's take a look at some commonly used layouts. In Swing, we use Layout Managers. Layout Managers are classes that control the size and the location of each of the components that are added to a container. I do want to make a quick note that don't get discouraged if you find it difficult to get the right layout using the Wizzywig editor, because it takes practice. I find that referencing the Component Tree often helps and pay close attention to the Layout Manager specified for each panel. Okay, let's talk about the different Layout Managers. Swing provides many different Layout Managers, but some of the more common layouts include a GridLayoutManager, a BorderLayout, and a FlowLayout. The Grid Manager Layout displays components in rows and columns. We have the BorderLayout, which splits the view into five areas; north, south, east, west, and center. And finally, the FlowLayout, which uses a single row wrapping to the next row when needed, adding components from the…