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

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: 42955
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)?
subject: Painting from an applet