I have built a file menu with three buttons New Open Save as they show up fine but now how do i get them to work. this is for a program I'm trying to write that will open a blank file for NEW open an existing file from a directory for OPEN and save a newly formed file in the SAVE AS function. Currently I add an action to the menu items with a simple item.addActionListener(this); call but I don't think that will work to get them to do what I want.
Perhaps a code snippet would help everyone here. The basic process is to create the menu items, add action listeners to them and then set up if/else blocks within the actionPerformed(AvtionEvent e ){} method to deal with the individual menu items. It's from within these if/else statement that you would put the functionality as you described it above (or better yet, calls to methods that provide this funtionality). I'm sure you've got all this together, so perhaps a look at you code could reveal the problem that you are having. Sean