This question is very similar to previously asked, but unfortunately, previous articles do not help much to solve a problem described below.
I would like to create a layout with three text areas that holds source code, code lines and some help information. And only one text area has a scroll bar. It's required to sync text areas in terms of text lines (wrapped text should not affect code lines) and scroll functionality (scroll bar in test area with source code will scroll all three areas).
Please look at layout example:

I already seen a number of topics that shown how to use row header in scroll pane, like in Text Component Line Number. In this aproach, I have no idea how to add third text area. I am looking for advice, how to create such kind of interface easily. Thank you!
I have no idea how to add third text area
Use a BorderLayout and add the components to left, center and right
[...] and only one text area has a scroll bar. It's required to sync text areas in terms of text lines (wrapped text should not affect code lines) and scroll functionality
Please have a look at following answers:
How to scroll two JTextPane's?
synchronize scrolling of N number of jtables in java swing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With