Consider the following applet program Public class Stars JAp
Consider the following applet program. Public class Stars JApplet implements MouseListener {int x = 10, y = 10; public void point (Graphics page) {addMouseListener (this); page.drawString (\"*\", x, y);} public void mouseClicked (MouseEvent event) {x = event.getPoint (). x; y = event.getpoint (). y; repaint ();} TripleDot} Which methods and in which order are called when the applet below is loaded in the browser (circle the correct answer)? paint, mouseClicked paint mouseClicked, paint Which methods and in which order are called when the mouse is clicked (circle the correct answer)? paint, mouseClicked paint mouseClicked, paint What must be added (replacing TripleDot) so that the program compiles without errors (assuming that the required java packages are imported)? A definition of the repaint() method Definitions of the mousePressed, mouseReleased, mouseEntered, and mouseExited methods. A definition of the main() method
Solution
A-a) It continues in that order.
B-c) only after the mouse click has been registered ,the paint function is executed.
C-d) without the main method the program will not run
