Article View: borland.public.jbuilder.java.api
Article #1235question about Component and JComponent
From: PeterH
Date: Tue, 16 Apr 2002 20:40
Date: Tue, 16 Apr 2002 20:40
16 lines
1583 bytes
1583 bytes
Hi, these questions are coming from my attempts at drawing jpgs on a form (generically named on purpose). Does the paint(Graphics g) method belong to the Component class only? And likewise does the paintComponent(Graphics g) belong to the JComponent class? Then by travelling backup the ancester tree from JComponent to the Component, there is a paint(Graphics g) at the JComponent, Component and at the Container levels. I'm confused as to which one I'm supposed to be using? I figure the paint() method is overridden as you go down the classes, but do I need the paintComponent(Graphics g) then? I'm sorry if this is a newbie question, I'm just trying to get it settled in my head. Thanks.
Technical Details
Message-ID:
<3cbc8c3d_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,64219872a96b6d37,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-04-16 13:51:04 PST From: "PeterH" <!REMOVEBeforeSending!peter@pchenry.com> Newsgroups: borland.public.jbuilder.java.api Subject: question about Component and JComponent Date: Tue, 16 Apr 2002 16:40:31 -0400 Lines: 20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 66.46.195.190 Message-ID: <3cbc8c3d_2@dnews> X-Trace: dnews 1018989629 66.46.195.190 (16 Apr 2002 13:40:29 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews