开发者

what is different between paintcomponent() and paintcomponents()?

开发者 https://www.devze.com 2023-02-24 23:42 出处:网络
I want to know 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号