Unit IV

download Unit IV

of 2

description

Unit-IV

Transcript of Unit IV

Unit IV1 mark1) What is an applet?2) When button is pressed which event is generated?3) For handling Key events, which Listener interface must be implemented?4) What is an Event in java?5) When check box is selected which event is generated?6) For handling button related event, which Listener interface must be implemented?7) Which model is used to provide actions to AWT component?8) What is an adopter class?9) What is the default layout in applet?10) Which method is used to output a string in an applet?11) AWT stands for?12) Which package contains Applet Class?13) Write the syntax of paint() method?14) Which method is used to draw a rectangle in the applet?15) Which package contains all the classes and methods required for event handling in java?16) Which method is used to register a keyboard event listener?17) What is listener in context to event handling?18) Which method is used to draw a Line in the applet?19) Which interface defines the actionPerformed() method?20) How to change the text font in an applet? 2 Marks:1) Write the states of an applet?2) What is an applet? How does applet differ from applications? 3) What are the attributes of applet tag?4) What are the methods that controls an applets life cycle?5) What is event delegation model? 6) What is an Event source in java, give some example Event sources?7) What is an Event Listener in java, name some Event Listeners?8) What is event adapter class? When we should use an event adapter class?9) Write the purpose of repaint() method?10) What are different Layout Managers available in java?5 marks1) Explain lifecycle of an applet?2) Write an applet to display message with different fonts?3) Explain with an example how to read data from the applet parameters?4) Write a java Program to handle Mouse Events.5) Write a java Program to handle Keyboard Events.

10 marks1) What is an applet? Explain the skeleton of an Applet with example program?2) What is an Applet? Explain the life cycle of an applet? How parameters can be passed to Applets?3) Write short notes on handling events with example?4) Discuss Event Delegation Model with example?5) What is an Adapter class and how can adapter classes are effective? 6) Write a java program to handle mouse and keyboard events?7) What is event handling? Explain focus event, key event and mouse event with examples.8) Explain any 5 Event classes?9) Explain about following event classes a) Action Event b) ItemEvent c) MouseEvent 10) Explain about following event classes b) ComponentEvent b) Container Event c) KeyEvent