Java wraps text around an image

How to wrap text around an image in Java? Or how to do CSS float in Java?

I am loading HTML text with some image tags in a JTextPane component.

Example:

text text text text <img src="image.ext"> text text text

Example 2: http://www.bbc.co.uk/news/world-us-canada-11882019 (text on the left, the image looks like something like that)

And I need the image to be wrapped with text.

Tried to use css ... float: right;(Java does not support this function .. need it ..)

Tried all image alignment (left, right, etc.) (no luck ..)

PS PHP programmer.

+3
source share
2 answers

Swing , JEditorPane HTML .

+2

- ( ) SoftChalk ( http://softchalk.com/), . HTMLEditorKit.

( BlockView - BODY, DIVs, , ..

0

Source: https://habr.com/ru/post/1777766/


All Articles