您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Extend Index

Extend Page # 2

Example application with menu bar

Consider this application window:

The frame of this window has2 menus: 'File' and 'Help'. The 'File' menu has the following items:

New

Open

Save

-------

Exit

and the 'Help' menu has a single menu item:

            About

The Java code to generate this application is in listing: FrameMenu1.java.

NOTE

When running this application, since no actions have been created to deal with events, in addition to the menus having no behaviour, you will have to terminate the application by pressing CTRL-C in the console window where you ran the application.

Back to top

basicline.gif (170 bytes)