JMenuBar added with menus and menu-items. ActionListener added to each menu-item to display its name on cmd when clicked.