Sign Håvard Rast Blok

Generic Menus

Generic Popup and Menu Bar

This class constructs a generic JMenuBar. The input to the constructor is an array of Strings describing the menubar. To each menu item which is not a seperator, the ActionListener is added.

Download

Download from SourceForge SourceForge.net Logo

Usage

Example:

 private String menuText[][] =
 {
   {"File", "Exit"},
   {"Font options", "Set Font", "-",
    "[1]8", "[1]10", "[1]12", "[1]14", "-", "/Bold", "/Italic"},
   {"3D options", "|Outline", "/Flat filled", "/Extruded" },
   {"Help", "Help", "About"}
 };


 menu = new GenericMenuBar( menuText, myActionListener );



site: Håvard Rast Blok
mail:
updated: 20 July 2006