javagwtsmartgwt

How to create a header in Smart GWT


I need the simplest thing I ever asked on Stackoverflow: <h2>-like object to present as a header above some widget.

I can create Label, but it has no way of setting large font size as far as I could find out.

So to reiterate the question: I want an equivalent of <h2> that could be put into VLayout.


Solution

  • Here's a solution for that:

        VerticalPanel vp = new VerticalPanel();
        Element h2 = DOM.createElement("h2");
        HTMLPanel widget = HTMLPanel.wrap(h2);
        vp.add(widget);