As Ice13ill said, setting innerText or innerHTML will break the w1 and w2 widgets (their element are rebuilt, so the instance they reference are no longer in the document, and event handlers obviously fails too (no longer registered, to begin with)).
If using a Label or HTML (or InlineLabel/InlineHTML) is not an option: String w1Id = HTMLPanel.createUniqueId(); String w2Id = HTMLPanel.createUniqueId(); HTMLPanel panel = new HTMLPanel("<span id='" + w1Id + "'></span><span id='" + w1Id + "'></span>large text"); panel.addAndReplaceElement(w1, w1Id); panel.addAndReplaceElement(w2, w2Id); Alternatively, something can be hacked that way: flowPanel.add(w1); flowPanel.add(w2); flowPanel.getElement().appendChild(Document.get().createTextNode(...)); Use at your own risk. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/NftmeExljfkJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.