what is different between paintcomponent() and paintcomponents()?
I want to know what is different between paintcomponent() and 开发者_如何转开发paintcomponents()?
when i use from paintcomponent it shows every thing that we want,but paintcomponents didn't do any thing!
From a quick browser of the source of java.awt.Container.paintComponents
it seems like it (indirectly) calls paint (after some other processing) on it's child components, and the only reason you'd override it is if you want to do something funky with it. Generally unless you really know what you're doing you probably shouldn't override it and instead should just override paintComponent
on the appropriate control.
精彩评论