Displaying HTML in GWT Panel

gwt, html

Solution

Short Answer: You can add HTML to a GWT Panel by creating an HTML widget and attaching that widget to your panel. For example...

HorizontalPanel hp = new HorizontalPanel();
HTML html = new HTML("<p>This is html with a <a href='www.google.com'>link</a></p>");
hp.add(html); // adds the widget to the panel

Long Answer: There are a variety of ways that you can add HTML to a GWT Panel. You should start by reading the Developer's Guide for GWT. Specifically, you should read the portions on Layout Using Panels and Widgets.

Problem

Is there a way to display HTML in a GWT Panel?

Original source