It seams the formatted message I set didn't show well. I want to (as the subject says) Render HTML content from the String.
Is there a way to get the label to render: "*This* is a *Message*" [this line here and in the original message is formatted with bold and italics] On Nov 12, 2007 5:02 PM, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote: > Hehe, nasty! :-) > > I suggest doing it in one replaceAll though: > > text.replaceAll("<[^>]*>", "*") > > This has the added benefit of correctly treating unexpected and as yet > unknown tags, and thus is more future proof! > > Regards, > Sebastiaan > > Martijn Dashorst wrote: > > this should get what you want: > > add(new Label("foo", text.replaceAll("<b>", "*") > > .replaceAll("</b>", "*") > > .replaceAll("<i>", "*") > > .replaceAll("</i>", "*"))); > > > > Martijn > > > > On 11/12/07, Francisco Diaz Trepat - gmail > > <[EMAIL PROTECTED]> wrote: > >> Hi, I have a Label who's model maight come with markup for bold italic, > >> bullets, etc. (e.g. "<b>This</b> is a <i>Message</i>") > >> > >> Obviously I get "<b>This</b> is a <i>Message</i>" rendered. > >> > >> Is there a way to get the label to render: > >> > >> "*This* is a *Message*" > >> > >> thanks, > >> f(t) > >> > > > > >