🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #7957

2 times 2MB Textfile in 2 jEditorPanes -> OutOfMemoryError ?!

#7957
From: Rania Tarazi
Date: Wed, 15 Nov 2000 00:00
24 lines
1597 bytes
Hallo,

I am programming a simple Java-Application in which 2 separate jEditorPanes
are supposed to each show relative large text files. Both the jEditorPanes
are visible at the same time. One jEditorPane loads a 2MB text file, the
other jEditorPane loads a 711kB text file. After having successfully loaded
the first 2MB text file into the jEditorPane I then want to load another
711KB text file via jButton into the other jEditorPane.

Error: Following error then shows up:
Exception occurred during event dispatching:
java.lang.OutOfMemoryError: sun.awt.image.BufferedImageGraphics2D
 at java.lang.Object.clone(Native Method)
 at sun.java2d.SunGraphics2D.clone(SunGraphics2D.java, Compiled Code)
[... and a lot more]

Remark: My application works fine with two small text files e.g. 6 kB.

Question: There seems to be a storage problem. How do I increase the memory
which is made available for the JVM in JBuilder 3.5 Foundation, JDK 1.2.2?
The same question for a "normal" Java Runtime Environment 1.2.2.

Thanks for any helpful tips,
Rania Tarazi
Technical Details
Message-ID: <3a125466$1_1@dnews>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,f42edfa21aff8cb9,start
X-Google-Attributes: gid111d45,public
From: "Rania Tarazi" <nospam.rtarazi@gmx.de>
Subject: 2 times 2MB Textfile in 2 jEditorPanes -> OutOfMemoryError ?!
Date: 2000/11/15
Message-ID: <3a125466$1_1@dnews>
X-Deja-AN: 693825332
X-Trace: 15 Nov 2000 01:16:22 -0800, 62.227.38.111
X-MSMail-Priority: Normal
X-Priority: 3
Newsgroups: borland.public.jbuilder.java.swing
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400