File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes FAQ: BackgroundImageOnJPanel missing call to super? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "FAQ: BackgroundImageOnJPanel missing call to super?" Watch "FAQ: BackgroundImageOnJPanel missing call to super?" New topic
Author

FAQ: BackgroundImageOnJPanel missing call to super?

Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Isn't the example on http://faq.javaranch.com/view?BackgroundImageOnJPanel missing the call to super.paintComponent()?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
as it paints the entire area, visually there is no difference,
but if the x,y co-ords or the sizing were changeable - the super call
would definitely be required.

unless it paints on top of, on top of, on top of etc??

perhaps it would be safer, and more consistent to include the super call.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FAQ: BackgroundImageOnJPanel missing call to super?