[576] in java-interest

home help back first fref pref prev next nref lref last post

Re: applet graphics not clearing each time paint() is called

daemon@ATHENA.MIT.EDU (Scott Fraize)
Sun Jul 2 23:38:57 1995

To: java-interest@java.Eng.Sun.COM
Date: Sat, 01 Jul 1995 18:03:19 -0700
From: Scott Fraize <scott@dimensionx.com>

Fri Jun 30, 4:45pm PDT, David Sklar <t-davids@microsoft.com>  writes:
>How can I tell a simple applet (and/or it's Graphics object) not to 
>clear each time paint is called?

>	public void paint(Graphics g) {
>		g.drawLine(oh,ov,h,v);
>	}

Define a method called update that works exactly
like paint.

So:

	public void update(Graphics g) {
		g.drawLine(oh,ov,h,v);
	}

And then in this case you might as well redefine paint as:

	public void paint(Graphics g) {
		update(g);
	}


Scott Fraize
scott@dnx.com

-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post