What is the difference between Stackpanel 开发者_C百科and Stacklayoutpanel?
According to the Dev Guide, StackPanel is deprecated and you should use StackLayoutPanel. Basically StackPanel works only in quirks mode, while StackLayoutPanel works only in standards mode, as well as being rooted on the RootLayoutPanel, not the RootPanel.
The LayoutPanels
are a newer collection of panels that have much more predictable behavior across browsers. When given a choice, prefer anything based on the Layout system.
This is waaaaay oversimplified, but on a general level, all of the layout panels are more "div" like, vs. the original panels being organized in tables.
So, when you want to do predictable stuff across disparate screen sizes, etc., the layout stuff does what you've come to expect. So definitely use them over all else. In fact, if you're trying to use GWT for the ease of writing in Java and ignoring web design, use as many FlowPanels with css as possible.
精彩评论