Search code examples
java-melwuittext-formatting

LWUIT display bold text + normal text


I need to display some Rich-Text in LWUIT.

I was thinking of HTML Component, but I can't get linewrapping there - probably an error on my side.

Another idea would be to use TextAreas or Labels and do it manually.

I'd need the possibility to have bold words in a non bold sentence.

Hello, this is a bold. <- This dot shouldn't be bold.

Is there a way I can achieve that? I think I only can use one Font per Component...


Solution

  • Use a Container with flow layout and just place labels into it. This is what the HTML Component does internally.