I suggest creating a div specifically for this display area on your HTML page. For example, in your HTML file:
<div id="header"></div> <div id="userStats"></div> <div id="content"></div> ... the rest of our page
However, you catch when someone is logged in (Database, EventBus, independently), just update this panel as follows:
RootPanel statsPanel = RootPanel.get("userStats"); statsPanel.clear(); statsPanel.add(new StatsPanel());
Perhaps you are creating your StatsPanel using UiBinder.
source share