JTextArea JLabel compare two txt. files line by line

前端 未结 2 1085
庸人自扰
庸人自扰 2021-01-26 21:42

everybody. I have completed my code two txt files by showing on the same area.

but I want to compare two txt files line by line. and I want to show the differences with

相关标签:
2条回答
  • 2021-01-26 22:24

    You might need to ask user to upload both versions of file.

    In the server you need to compare line by line, and store the line numbers of the file differences in another file or location

    Then, while displaying, get the line numbers and give them proper decoration (i.e bold etc.).

    0 讨论(0)
  • 2021-01-26 22:26

    JTextArea might make a suitable view, but you still need to model the differences. I'd look at the Eclipse or NetBeans platforms, or perhaps svnview.

    0 讨论(0)
提交回复
热议问题