How to top align paragraph of texts in multiple different Swing text components?

140 views Asked by At

I'm trying to make a text editor in Java for translators that put the original text side by side with the translation, something to the effect of EU journal multilingual display, where the same paragraph in different languages visually begins on a level horizontal line.

I'd like the texts to be contained within different text elements(of type JTextArea, JTextPane or JEditorPane). The text elements will have line wrapping enabled. Then the application should somehow adjust the spacing after each paragraph so that it looks like the above web page.

There might be a scroll bar to move all panes to the same position, or I may just sync the scroll position of all the panels.

How can I achieve the above objectives?

Here is what I currently have:

Tri panel Swing layout

0

There are 0 answers