Hello,
 
I'm trying to figure out what goes on when a non-opaque child gets repainted, i.e. exactly where do the parent pixels come from that supply the child's background.
 
I have a parent panel which has several non-opaque children. Thus the parent image 'shows through' the transparent/empty parts of the children.
 
I have put trace code in the parent and child paintComponent methods to see the order of calls.
 
What I have determined is this:
 
The parent's paintComponent finishes, then the parent's paintChildren is called, then the paintComponent method of each child is called. However during the repaint of the children, their backgrounds are refreshed with pixels from the parent.
 
The parent and the children are all double-buffered JPanels.
 
How does the system get at these without calling the parent's paintComponent?
 
Thank you,
 
Ted Hill

Reply via email to