Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: supercalifragilisticexpialadiamaticonormalizeringelimatisticantations Newsgroups: comp.lang.java.programmer Subject: Re: can't stop JPanel paint Date: Thu, 14 Jul 2011 08:37:52 -0400 Organization: supercalifragilisticexpialadiamaticonormalizeringelimatisticantations Lines: 9 Message-ID: References: <728e86bb-daed-40cd-b8a2-d2bf08059dd5@glegroupsg2000goo.googlegroups.com> NNTP-Posting-Host: i/Qx8aG7GhfvVWTGQz7VLw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: WinVN 0.99.12z (x86 32bit) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6187 On 14/07/2011 7:43 AM, Peter Cheung wrote: > Hi > I have overrider all the paintXX method and did nothing in there. But why I still able to see the component on top of the JPanel? A component in a container such as a panel paints itself separately, not as part of the panel's paint. If the area is obscured and then uncovered, a repaint event is sent to the panel first, then to its children. Even if the panel itself ignores the event the children generally won't.