Java Swing Interview Questions and Answers
Ques 21. Which method is used by the applet to recognize the height and width?
getParameters()
Method is used by the applet to recognize the height and width.
Ques 22. When we should go for codebase in applet?
If the applet class is not in the same directory, codebase is used.
Ques 23. What is the lifecycle of an applet?
init( ) method - called when an applet is first loaded
start( ) method - called each time an applet is started
paint( ) method - called when the applet is minimized or maximized
stop( ) method - called when the browser moves off the applet's page
destroy( ) method - called when the browser is finished with the applet
Ques 24. Which method is used for setting security in applets?
setSecurityManager()
Method is used for setting security in applets.
Ques 25. What is an event and what are the models available for event handling?
Changing the state of an object is called an event. An event is an event object that describes a state of change. In other words, event occurs when an action is generated, like pressing a key on keyboard, clicking mouse, etc. There different types of models for handling events are event-inheritance model and event-delegation model.
Most helpful rated by users:
- Why does it take so much time to access an Applet having Swing Components the first time?
- What's Java Swing?
- What are the differences between Swing and AWT?
- What is JFC?
- What is AWT?