🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #13084

Viagra for JPanel: is update() impotent?

#13084
From: cyze
Date: Fri, 18 Sep 1998 00:00
20 lines
1556 bytes
I've been experimenting with Swing (v1.0.1) for the past while.  As an
exercise, I decided I would port an old webcam application I had written.  I
noticed some odd behaviour regarding a JPanel and update(): I found that when
I extended one of my classes from a JPanel as opposed to a Panel, update()
was no longer getting called as I would have expected.	I changed my code
back to my pre-Swing version by extending my class from awt.Panel, and yup,
update() was originally getting called.  I add a 'J' in front of Panel, and
no more updates.

Is this some artifact of the doublebuffering mechanism of the JPanel?  Should
I just put all my drawing in paintComponent?

Thanks for your help!
Mike.

PS: Please reply to cyze@gsd.is.co.za , and NOT cyze@noisiavision.com as it
says in the news header.  Thx!

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
Technical Details
Message-ID: <6ttou5$ncm$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,324e44b746846e52,start
X-Google-Attributes: gid111d45,public
From: cyze@noisiavision.com
Subject: Viagra for JPanel: is update() impotent?
Date: 1998/09/18
Message-ID: <6ttou5$ncm$1@nnrp1.dejanews.com>
X-Deja-AN: 392389132
X-Http-Proxy: 1.0 x2.dejanews.com:80 (Squid/1.1.22) for client 196.26.115.1
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Fri Sep 18 13:58:29 1998 GMT
Newsgroups: borland.public.jbuilder.java.swing
X-Http-User-Agent: Mozilla/4.5b1 [en] (WinNT; I)