Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Daniele Futtorovic Newsgroups: comp.lang.java.programmer Subject: Re: how do you block the GUI repaints? Date: Tue, 22 May 2018 22:47:33 +0200 Organization: A noiseless patient Spider Lines: 10 Message-ID: References: <2ddef1c1-ac37-4384-a3a5-f9b94a1fcbf6@googlegroups.com> <6762ff5e-8846-4ea7-be57-7518f2d7ff42@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 22 May 2018 20:48:24 -0000 (UTC) Injection-Info: h2725194.stratoserver.net; posting-host="cf8c1d9abc15855833cc5675df0cf524"; logging-data="30589"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/IeBg76HuUIcVUGjmwbSnj" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 Cancel-Lock: sha1:sFbB5LvqM2u5CA0/WQNU4x2wbrY= In-Reply-To: <6762ff5e-8846-4ea7-be57-7518f2d7ff42@googlegroups.com> X-Antivirus-Status: Clean Content-Language: en-GB X-Antivirus: AVG (VPS 180522-4, 05/22/2018), Outbound message Xref: csiph.com comp.lang.java.programmer:38268 On 2018-05-22 22:20, Eric Douglas wrote: > JTextArea is my next big control. Normally we just do one insert, as we just use it to display about a dozen lines of text at a time. Now I'm trying to make a file viewer. I tried loading a text file into any number of text file editors but they just crash because it's too big (email dump). I wanted to see if I can load the whole thing at once into a JTextArea. If not I want to get as much as possible, then I can remove text if necessary to add more, with first/previous/next/last buttons to scroll through the file. I have no problem reading multiple chunks from any point in the file, but I can't call the JTextArea insert multiple times in a row without locking up the EDT because it wants to repaint every time. > You'll obviously need to page through the file. Check out java.io.RandomAccessFile. -- DF.