I'm unclear on what you mean by this:
Originally posted by Yogvinder Singh Ghotra:
Which of paint or paintComponent is called?
You need to read the JComponent API as well as the Sun graphics tutorials. They will tell you that both are called but have different responsibilities. Paint calls paintComponent, but it also is responsible for painting borders and child components, so if you are not manipulating these, you don't want to override paint but instead should override paintComponent (as was suggested above). Again, if this doesn't answer your question, then
you should rephrase it as it is not clear in the least.