Posts

Java Event Delegation Model, Listener and Adapter Classes

Image
Java Event Delegation Model The Delegation Event model is one of the many techniques used to handle events in GUI (Graphical User Interface) programming languages. GUI represents a system where an user visually/graphically interacts with the system. Other interactive systems are text based or called CUI (Character User Interface). CUI interacts with the system by typing out commands in the console. GUI programming is inherently event driven; that means, whenever an user initiates an activity such as a mouse move that changes the co-ordinates of the mouse pointer in the screen, or clicks a button, scrolls a page, and so forth, each is deemed as an event that the GUI event handler maps the activity to a piece of code that explains what response the application should provide to the user. Any program that uses GUI (graphical user interface) such as Java application written for windows, is event driven. Event describes the change in state of any object.  For Example:  Pre...

Applet in Java

Image
Applet in Java ·          Applets are small Java applications that can be accessed on an Internet server, transported over Internet, and can be automatically installed and run as a part of a web document. ·          After a user receives an applet, the applet can produce a graphical user interface. It has limited access to resources so that it can run complex computations without introducing the risk of viruses or breaching data integrity. ·          Any applet in Java is a class that extends the java.applet.Applet class. ·          An Applet class does not have any main() method. It is viewed using JVM. The JVM can use either a plug-in of the Web browser or a separate runtime environment to run an applet application. ·          JVM creates an instance of the applet class and ...