🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16041

Re: Why this doesn't work

#16041
From: Tor Iver Wilhelmsen
Date: Fri, 09 Apr 1999 00:00
23 lines
1098 bytes
"Alexis Rios" <alexr@coqui.net> writes:

> I'm trying to use some text at the applet using double buffering. The thing
> is that the applet is always displaying this message:
> 
> My counter is: 1
> 
> and although is incrementing the variable counter, it always display 1

Since you override update() to paint on offGr, the only time the
Applet's Graphics is used is on the initial paint - repaint events
will only paint on offGr.

Thus you only see the counter value "1", because everything else is
painted to the offscreen buffer, and never onscreen.

use

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

instead.
Technical Details
Message-ID: <u3e2a6xti.fsf@sds.no>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7eiopg$24c17@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,b4ed2ae2a3803097
X-Google-Attributes: gidf74b3,public
From: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no>
Subject: Re: Why this doesn't work
Date: 1999/04/09
Message-ID: <u3e2a6xti.fsf@sds.no>
X-Deja-AN: 464349662
Sender: towi@SDSA1761
References: <7eiopg$24c17@forums.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language