This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes paintContainerChildren() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "paintContainerChildren()" Watch "paintContainerChildren()" New topic
Author

paintContainerChildren()

Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
Hi, what class does paintContainerChildren() belong to? And what does it do?
Sean MacLean
author
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
I don't recall seeing this particular method in the awt api but there is a method called Component.paintAll() that is used to make sure that all of the sub-components of a container get repainted. I believe it is called automatically in most cases but sometimes (i.e. when you create a custom component, for instance) you may want to call it directly.
Sean
Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
How embarrassing! This is a third party method. Goes like

added UBB CODE tags to help make the code more readable
[This message has been edited by Frank Carver (edited January 02, 2001).]
Sean MacLean
author
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
Don't sweat it. I think we've all done that before - I know I have. It looks as though that's exactly what this method is doing. Simply looping through all of the components within the container passed to the method and making sure that the child components are being painted. If you really want to see what it's doing within the entire application, try changing or reducing it's functionallity and see what happens. Don't forget to make a backup though (I think we've all done that too! )
Sean
 
Consider Paul's rocket mass heater.
 
subject: paintContainerChildren()