I just want to know why both the paint and draw methods are used in Java Applet creation. What is the difference between them?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When an applet is placed on a Web page, it is assigned a rectangular area on the page. It is the job of the applet to draw the contents of that rectangle.Similarly, when an applet needs to be drawn, the Web page calls the paint() routine of the applet.But there is no draw() method in applet.When you want to draw something, you should use Graphics class for example Graphics.drawLine(), Graphics.drawOval(), etc.