Results 1 to 1 of 1
- 11-02-2009, 11:03 PM #1
Member
- Join Date
- Nov 2009
- Posts
- 1
- Rep Power
- 0
Display partial file contents in JTextArea
I'm looking for a way to view the contents of a file in a JTextArea in such a way that I can scroll back and forth through the file. The catch is that I only want to load a portion of the file (in the case of large files) to improve performance and avoid memory overflow.
When scrolling through the JTextArea (which presumably would be inside of a JScrollPanel), I will need some way to recognize when I've scrolled past, say 50% of, what's in the JTextArea so that I can reload it with the next chunk of the file.
The general idea is to only populate the JTextArea with a set number of characters and to dynamically retrieve chunks of the file as needed.
Any suggestions on how to approach this?
Similar Threads
-
Problem with painting the contents of a file on a JTextArea
By Willi in forum AWT / SwingReplies: 12Last Post: 10-09-2009, 06:26 AM -
problem trying to display the contents of a text file in JTextArea
By warship in forum New To JavaReplies: 17Last Post: 07-13-2009, 05:44 AM -
problems trying to view the contents of a text file in JTextArea
By warship in forum New To JavaReplies: 1Last Post: 07-18-2007, 11:20 PM -
problem trying to view the contents of a text file in JTextArea
By warship in forum AWT / SwingReplies: 0Last Post: 07-17-2007, 03:30 PM -
viewing the contents of a text file in JTextArea
By warship in forum New To JavaReplies: 0Last Post: 07-17-2007, 02:29 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks