I understand that officially GWT recommends using the newer RootLayoutPanel but some posts on the internet claims that for some web applications it is better to use the RootPanel.
How can one decide which one to use?
Is there any different use cases for each? (or every requirement can be satisfied with either)
I understand that officially GWT recommends using the newer RootLayoutPanel but some posts on
Share
RootLayoutPanelcan’t be better. It is just different.RootPanelallows you to add widgets to the page (basically you can use some html element on the page as root widget). You can define multipleRootPanel'sin the same application.RootLayoutPanelbehaves a little bit differently, it always tries to fill all the available size in the window, so the content inside of the panel will perfectly fit the browser window size. It will also track the size of the window, and will resize child elements accordingly (if they support it). AlsoRootLayoutPanelwill try to attach itself directly to the<body> element, e.g. you can’t choose which html element on the page will become a “starting point”.So, depending on what you want to do you can choose
RootPanelorRootLayoutPanel.