Drop_of_Rain
asked on
Help with saveAsMenuItem.addActionListener
Someone here said it would be better to use the type of code below, other then ActionCommand:
saveAsMenuItem.addActionLi stener(new java.awt.event.ActionListe ner() {
public void actionPerformed(ActionEven t e) {
saveAsMenuItem_actionPerfo rmed(e);
}
});
Could someone give me an example of how this would be used from a menu through to a SaveAs JFileChooser.
saveAsMenuItem.addActionLi
public void actionPerformed(ActionEven
saveAsMenuItem_actionPerfo
}
});
Could someone give me an example of how this would be used from a menu through to a SaveAs JFileChooser.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
yes
you would only need to do that initialisation of the chooser once though, not every time you wanted to use it.
> I have an accessory named AudioAccessory to add to the file chooser
Yes, thats correct :)
Yes, thats correct :)
ASKER
I doubled the points to make it fair on you guys.
Thanks everyone for all the support.
Thanks everyone for all the support.
ASKER
y.setDialogTitle("Save . . .");
AudioAccessory aa = new AudioAccessory();
y.setAccessory(aa);
y.setFileSelectionMode(JFi
y.setCurrentDirectory(new File("C:/"));