Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2005

Tip: Looking for answers? Try searching our database.

JTextArea and OutOfMemory message

Thread view: 
hystrio - 31 Mar 2005 06:20 GMT
Hi all!

A question about JTextArea behaviour.
If I read sequentially a big list of files and
append the lines on a JTextArea, after a while
I get a Memory error.
If I concatenate the list of text files in a single big file
and then read from it, there is no error, unless
the file is really huge. I got an error with a file
exceeding 5M.
Besides that, if I select a big text from the JTextArea
there is no way of copying it and paste.
Any idea why?
Are there memory limitations in the JTextArea?
Or is it a JVM problem?

Thank you all in advance
Orlando
John McGrath - 31 Mar 2005 11:04 GMT
> A question about JTextArea behaviour.
> If I read sequentially a big list of files and
[quoted text clipped - 9 lines]
> Are there memory limitations in the JTextArea?
> Or is it a JVM problem?

It is pretty hard to tell what is wrong with the code, since you did not
post the code.

But I'll take a wild stab:  Are you closing the files?

If that is not it, try posting a runnable example of the problem.

Signature

Regards,

John McGrath

Esmond Pitt - 31 Mar 2005 12:04 GMT
> Any idea why?
> Are there memory limitations in the JTextArea?
> Or is it a JVM problem?

Well of course there are memory limitations. There are *always* memory
limitations.

More importantly, why on earth would you want the contents of multiple
files in a single JTextArea? What is the purpose?

I think you need to redesign your GUI.
hystrio - 31 Mar 2005 22:16 GMT
>> Any idea why?
>> Are there memory limitations in the JTextArea?
[quoted text clipped - 5 lines]
> More importantly, why on earth would you want the contents of multiple
> files in a single JTextArea? What is the purpose?

Processing a huge mailing list to sort the subjects.

Bye

Orlando
Esmond Pitt - 01 Apr 2005 01:29 GMT
>>>Any idea why?
>>>Are there memory limitations in the JTextArea?
[quoted text clipped - 7 lines]
>
> Processing a huge mailing list to sort the subjects.

so why the JTextArea? why not Collections.sort()?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.