Atitit. Software Development GUI Layout Management Pros and cons summary java swing WPF Web HTML C + + qt php ASP. WinForm
1. Inheritance structure of layouts 1
2. Absoluti Layout (common) 1
3. Dock, Anchor layout //springlayout (Common ) 2
4. Flow layout (not used) 2
5. BorderLayout (not used) 2
6. BoxLayout ( HTML default layout) 3
7. CardLayout (tab layout) 4
8. GridLayout ( not used ) 4
9. GridBagLayout ( not used ) 4
Fixed positioning (not used) 4
Grouplayout ( not recommended ) 4
12. Other Layouts 5
12.1. Defaulttoolbarlayout 5
12.2. Metalrootlayout 5
12.3. JBuilder verticalflowlayout5
12.4. Overlaylayout 5
12.5. Rootlayout 5
three major layouts of Java : Border,flow,grid 6
14. Reference 6
1. Inheritance structure of layouts
LayoutManager interface : :: implemented with grid,flow layout, etc. . .
LayoutManager 2 interface : The new layout is implemented .
2. Absolutilayout (Common)
to set the div Property to Absoluti in Html
default layout for . Net
default layout for C + + qt
Simple and convenient : : Disadvantages, once the maximum interface, the layout is still unchanged, ugly.
Author:: Old Wow's paw attilax Ayron, email:[email protected]
Reprint please indicate source: Http://blog.csdn.net/attilax
3.Dock,Anchor Layout // Springlayout (Common)
Dock and the Anchor It is not allowed, but also to set the control Dock and the Anchor property is set after the previous setting is overwritten.
Springlayout is the strongest in terms of functionality and efficiency, and I'm now using springlayout to develop almost most of the layout.
Springlayout the incremental complexity of the layout operation and the number of constraints (and/or components) are line-related
Anchor Property
As the name implies, this property forces the control to position itself in a relative or absolute position within the parent form or parent control. This property has four values that can be turned on or off:
· top--indicates that the top of the control that is related to the parent form (or parent control) should remain fixed.
· bottom--indicates that the bottom edge of the control that is related to the parent form (or parent control) should remain fixed.
· left--indicates that the left edge associated with the parent form (or parent control) in the control should remain fixed.
· right--indicates that the right edge of the control in relation to the parent form (or parent control) should remain fixed.
Dock Properties
the Dock property forces the control to cling to an edge of the parent form (or control). Although the Anchor property can do this, the dock property allows you to have subforms in the parent form stacked on top (or next) to each other . ". If a subform changes size, other subforms that are parked next to it also change.
4. Flowlayout (not commonly used)
A little, compatibility good, different device width.
Html to set as float=left
5. BorderLayout (not used)
A BorderLayout object divides the interface into five large regions, specified by the static constants of the BorderLayout class, respectively:
-page_start
-page_end
-line_start
-line_end
-center
Effect:
6. BoxLayout (HTMLdefault layout)
BoxLayout can add components from top to bottom or from left to right into the current panel.
Effect:
.
7. CardLayout (Tablayout)
Card layouts are different from other layouts because they hide some components. A card layout is a set of containers or components that are only one display at a time, and each container in the group is called a card.
8. GridLayout (not used)
GridLayout lets you create a component table, and when the component is added, it will be left to right sequentially, from top to bottom, and it cannot be specified by you to put that grid in that grid.
9. GridBagLayout (not used)
GridBagLayout is the most complex of all AWT layout managers, and his features are also the most powerful. GridBagLayout, like GridLayout, manages components in the form of a grid in a container. But GridBagLayout features are much more powerful.
1, gridbaglayout Management of all rows and columns can be of different sizes;
2. GridLayout restricts each component to one cell, and GridBagLayout does not: The component can occupy a rectangular area of any size in the container.
Fixed positioning (not commonly used)
Allows the element to remain fixed on the screen, the drop-down scroll bar, and the position does not change
One. Grouplayout (Not recommended)
The grouplayout provided by NetBeans are too poor, the resulting code is too readable and the execution is inefficient.
12. Other layouts 12.1. DefaultToolBarLayout12.2. MetalRootLayout12.3. JBuilderBring your ownVerticalflowlayout12.4. OverlayLayout12.5. Rootlayout
Javathe three big layouts: Border,flow,grid
14. Reference
Swing Layout Manager Introduction - sub larvae -51CTO Technical blog . htm
Atitit. Software development GUI layout Management pros and cons summary Java swing WPF Web HTML C + + qt php ASP. WinForm