Ensode.net
Google
 

Home
Blog
Guides
Tips
Articles
Utilities
Reviews
About Us
Contact us


Facebook profile

XML

Enhance Your Echo2 Application with EchoPointNG Components
Bookmark and Share

The Menu Component

The Menu component is the most complex of the components discussed in this article. It contains a number of MenuItem components, and must be contained in a MenuBar component. MenuItems can contain other MenuItems to create cascading menus. The following code fragment demonstrates how to create and populate a menu:


public class MenuDemo extends ContentPane
{   public MenuDemo()   {     private MenuBar mainMenuBar = new MenuBar();     private Menu mainMenu = new Menu("EchoPointNG Components");     private MenuItem dateFieldMenuItem = new MenuItem("DateField");     private MenuItem dateChooserMenuItem = new MenuItem("DateChooser");     private MenuItem tabbedPaneMenuItem = new MenuItem("TabbedPane"); mainMenu.add(dateFieldMenuItem); mainMenu.add(dateChooserMenuItem); mainMenu.add(tabbedPaneMenuItem); mainMenuBar.add(mainMenu);   }
}

MenuItem components fire action events when clicked on, they can be handled by an instance of a class implementing nextapp.echo2.app.event.ActionListener , just like any other Echo2 component that fires action events.

Conclusion

EchoPointNG provides many additional components that ease the creation of sophisticated web based applications. There are many more components provided by EchoPointNG, we only showed a few here to give a taste of what it has to offer. To see the complete set of components provided by EchoPointNG, visit their web site (see resources).

Resources


Java EE 6 Development With NetBeans 7
Java EE 6 Development With NetBeans 7


Java EE 6 with GlassFish 3 Application Server
Java EE 6 with GlassFish 3 Application Server


JasperReports 3.5 For Java Developers
JasperReports 3.5 For Java Developers