Display HTML entity in GWT Label

334 views Asked by At

In GWT, my code:

rootPanel.add(new Label("© " + "2014" + " MyCorp"));

Displays nicely:

© 2014 MyCorp

instead of

© 2014 MyCorp

Any hint?

2

There are 2 answers

0
AudioBubble On

I would just do:

rootPanel.add(new Label("© 2014 MyCorp"));

or using HTML:

rootPanel.add(new HTML("© 2014 MyCorp"));
0
Braj On

You can try this one also:

    Label label1=new Label();
    label1.getElement().setInnerHTML("© " + "2014" + " MyCorp");