From Java-Api:(paint(...) method description)
"This method is called when the contents of the component should be
painted in response to the component first being shown"
from the sentence we know that paint method will called first time when
the program add the component (JFrame also a component)