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.
This is the code to clear some fields on a GUI. Try adding it like this (course all the GUI variables are defined elsewhere: [CODE] btnClear = new Button("Clear"); btnClear.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { txtDRNum.setText(""); txtName.setText(""); lblErrMsg.setText(""); lstPart.select(-1); lstToDept.select(-1); lstFromDept.select(-1); cbgNR.setSelectedCheckbox(ckbNew); cbgReason.setSelectedCheckbox(ckbSPE1); } [\CODE]
"JavaRanch, where the deer and the Certified play" - David O'Meara