Skip to main content

Posts

Showing posts from December, 2013

Review Questions

Topic: Applet, AWT and Event Handling 1. What are Applets? How it is different from Normal java class? 2. What is the difference between Panel, Applet, Window and Frame? Can we add a Frame within a Panel? 3. Explain the Applet Life cycle. What is the importance of paint() and repaint(). 4. List various methods of Graphics class. Write code snippet to draw the following shapes in Applet: String, Rectangle, Oval, Circle, Rounded Corner Rectangle, Polygon and Polylines. 5. What do you mean by Event Handling? Explain Event Delegation Model. How will you register an event source with Listener? Write code snippet. 6. WAP to create a GUI having 4 text fields in four different sides of a frame and a button at the center. Contents of Text fields must be swapped (North<--> South and East<--> West) when the button is pressed 7. WAP to create an applet displaying a ball filled with blue color. Use event handling to move the ball with the mouse-pointer. 8. Wh