Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does GWT have a Paragraph widget?

Tags:

widget

gwt

I've drawn a blank. Does GWT have a widget that produces the HTML P tag?

I want just the P tag to appear in the DOM, without any extraneous DIV's.

like image 280
David Avatar asked Oct 03 '09 00:10

David


1 Answers

GWT doesn't have such a widget. But you can easily create one. The SimplePanel has a protected constructor which allows it to create a panel with any HTML tag. To create a panel with the P tag, simply extend the SimplePanel and create it with your own constructor:

  public class PPanel extends SimplePanel {
    public PPanel() {
      super(Document.get().createPElement());
    }
  }
like image 100
Hilbrand Bouwkamp Avatar answered Nov 27 '22 01:11

Hilbrand Bouwkamp