In the systems that use command line interface, the user may be presented with a list of commands that would be displayed as a help text to the user. The users can then choose from the list to perform their desired action. In GUI systems, this is replaced with a set of text and symbols to represent choices. By clicking on the text/symbol, the user executes the desired action. This collection is called a menu.
A menu bar is a region of a screen or application that consists of a list of pull-down menu items. A common use of menu bar is to provide convenient access to various operations such as opening a new or an existing file, save the file, print options, manipulating data, providing help window, close the application and so on. In this section, we introduce the concept of adding a menu bar to our application. Before that, we define the central widget of the application which will aid the usage of menus.