Event, Event Driven Program, Event Source, Listener.

Q13.Explain the following:

  1. Event
  2. Event Driven Program
  3. Event Source     
  4. Listener.


  1.  Event: An Event is an object that represents some occurrence.Often events correspond to user actions such as pressing a mouse button, selecting an item from a menu, or typing in a text field.
  2. Event-Driven Program: A program that is oriented around a GUI responding to events from the user is called event-driven.
  3. Event Source: The event source is the GUI component in which the event occurred.
  4. Listener: A listener is an object that is “waiting” for event to occur and can respond in some way when it does.


Similarity and Difference between option button and check boxes.

Q12. What is the similarity and difference between option button and check boxes?

Ans. An option button is used to display an option that can be turned on or off. Usually option buttons are used for a group of options where from user can select just one.

Check boxes are used to allow a user select multiple choices.

Though option button and check boxes appear to function similarly, yet there is an important difference. When an option button is selected, all other option button controls in its group (i.e., in the same group) are automatically unselected. On the other hand, any number of check box controls can be selected.

Containers or Container Controls.

Q10. What are containers or container controls?

Ans. A container is a control that can hold other controls within it e.g., a Frame (there can be multiple controls inside a frame) or a label (it can hold an image and/or text) or simply window (we can put so many controls on it). Controls inside a container are known as child controls. The child controls can exist completely inside their containers. That means we can’t move them outside their container.

When we delete a container control, all its child controls automatically get deleted.

A Message and an Event.

Q9. What do you understand by a message and an event?

Ans. An Event refers to the occurrence of an activity.

Events can occur through user actions such as mouse click or a key press, through programmatic control, or even as a result of another window’s actions.

Each time an event occurs, it causes a message to be sent to the operating system.

A Message is the information/request sent to the application.

Visual programming.

Q8. What do you mean by Visual programming?

Ans. Visual is a method to create GUI applications. The visual programming style involves a lot of illustrations i.e., graphics entities, rather than writing numerous lines of code to describe the appearance, functioning etc. of the application’s interface.



Q4. What do you understand by JVM?

Ans. The Java Virtual Machine is an abstract machine designed to be implemented on the top of existing processors. It hides the underlying operating system from Java applications. Programs written in  Java are complied into Java Byte code, which is then interpreted by a special Java Interpreter for a specified platform. Actually this Java interpreter is known as the Java Virtual Machine(JVM).