File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Painting from an applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Painting from an applet" Watch "Painting from an applet" New topic

Painting from an applet

Christopher Young
Ranch Hand

Joined: Nov 02, 2007
Posts: 63
What's a good way to go about doing this?

I have to make an applet for school, it's a team project (But frankly we haven't been working much as a team) and the only way we know how to (or can think of) is to call repaint() from the paint method.

Is there a better way? Because that seems to use up memory if there's a lot of stuff.

Technology can never substitute for knowledge.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41089
Painting in an applet is the same painting in an application; you'd use the paint method (if you're using AWT) or paintComponent (if you're using Swing).

Could it be that there's a memory leak somewhere, or that you're performing something particularly memory-intensive (e.g. image operations)?

Ping & DNS - my free Android networking tools app
I agree. Here's the link:
subject: Painting from an applet
Similar Threads
inter applet communication
files from applet
Loading an Applet Takes Time
files from applet
can lowering the security option in IE5.0 help us reading file using applet