Hi All,
I'm currently working in Swing UI Assignment. This work involves showing large file content in JTextArea. The file size can be as large as 2 GB.
My initial idea is to lazily load content from the file, say 1 MB of content will be shown to the user. As the user scrolls i will retrieve the next 1 MB of content to be shown. All these operation will be happening in background thread (Swing Worker).
I looked at the JTextArea API, the method insert takes String and int(position of the insert) as the parameter.
This will suffice, but i'm worried about performance, because the content (1 MB at a time) retrieved will have to be converted to String object.
Is there any other work around or any other alternative/better solution for this.