GUI, Graphical User Interface, refers to the windows, buttons, dialog, menus and everything visual in a modern applications of JAVA. A GUI application involves much more than a screen made up of GUI components. It also involves properties of its components, actions events etc. in this article, we shall learn about these basics of a GUI.
The windows operating system manages all of these many windows by assigning each one a unique id number (called window handle). The system continually monitors each of these windows for signs of activity or in other words events. Events can occur through user actions such as a mouse click or press, through programmatic control, or even result of another window’s action.
An event refers to occurrence of an activity.
A message is the information/request sent to the application.
As you might imagine dealing with all of the possible combinations of windows, event and message could be complex. Fortunately, Java insulate you from having to deal with all of the low-level message handling. Many of the message are handled automatically by Java; others are exposed as Listener method for your convenience. This allows you to quickly create powerful applications without having to deal with unnecessary details.
Working of a GUI
A GUI Application consists of many GUI components such as windows, dialog, menus and other controls etc. while using a GUI Application. When you perform an action, an event is generated. In event-driven programming, that most GUI follow, the program respond to the events. Let us learn about how most GUI's function. And as you can guess that this depends upon how the constituent windows, events etc. function.Working of windows, Events and Messages
A window can be bought off as simple as rectangular region with its own boundaries. You are already aware of several different types of windows: a document window or a dialog box etc. While these are the most common examples, there are actually many other types of windows. A common button is also a window. Icons, text boxes, option buttons and menu bars are all windows.The windows operating system manages all of these many windows by assigning each one a unique id number (called window handle). The system continually monitors each of these windows for signs of activity or in other words events. Events can occur through user actions such as a mouse click or press, through programmatic control, or even result of another window’s action.
An event refers to occurrence of an activity.
- Each time an event occurs, it causes a message to be sent to the operating system.
- The system processes the message and broadcast it to other windows.
- Each window can then take the appropriate action based on its own instructions for dealing with that particular message (for example, repenting itself when it has become covered by another window).
A message is the information/request sent to the application.
As you might imagine dealing with all of the possible combinations of windows, event and message could be complex. Fortunately, Java insulate you from having to deal with all of the low-level message handling. Many of the message are handled automatically by Java; others are exposed as Listener method for your convenience. This allows you to quickly create powerful applications without having to deal with unnecessary details.
No comments:
Post a Comment