-
Painting to the applet.
Respected Sir/Madam,
I'm reading a file line by line. I want the contents of the file
to be displayed line by line on the applet. So after reading a line from
file I call repaint to paint the string to the applet. But when I write a
new string it erases the previous, and finally only the last line is visible
on the applet.
How can this problem be solved?
With regards,
Adeline Rose
-
Re: Painting to the applet.
Hello Adeline:
Where are you painting the String? If the coordinates you pass are the same
each time you repaint, then the VM will first clear the screen and then paint
the new String. It sounds like you'll need to change the coordinates (well,
at least the y-coordinate) each time and override update() so that the applet
doesn't clear the screen each time something is painted.
HTH,
Tom Duffy
"Adeline Rose" <adelinerose@usa.net> wrote:
>
>Respected Sir/Madam,
> I'm reading a file line by line. I want the contents of the
file
>to be displayed line by line on the applet. So after reading a line from
>file I call repaint to paint the string to the applet. But when I write
a
>new string it erases the previous, and finally only the last line is visible
>on the applet.
> How can this problem be solved?
>
>With regards,
>
>
>Adeline Rose
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks