jQuery in Action, 3rd edition
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: 42965
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)?
I agree. Here's the link: http://aspose.com/file-tools
subject: Painting from an applet
It's not a secret anymore!