• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FAQ: BackgroundImageOnJPanel missing call to super?

 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't the example on http://faq.javaranch.com/view?BackgroundImageOnJPanel missing the call to super.paintComponent()?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic