This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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


Win a copy of Elasticsearch in Action this week in the Big Data forum!
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.
 
rocket mass heater kickstarter
 
subject: FAQ: BackgroundImageOnJPanel missing call to super?