June 2005
Beginner to intermediate
336 pages
6h 29m
English
After the user has worked on a file, the Graphicizer would certainly let him down if he couldn't save his changes back to a file. Imagine doing a lot of work on an image and not being able to store the results.
That's why this application has a Save As… menu item, which, when selected, displays a File Save dialog box, created by setting the dialog object's mode to FileDialog.SAVE:
public void actionPerformed(ActionEvent event)
{
.
.
.
if(event.getSource() == menuitem2){
dialog.setMode(FileDialog.SAVE);
dialog.setVisible(true);
.
.
.
}
This displays the File Save dialog you see in Figure 3.3.
This dialog box's job is to get the name of the file the user wants to store ...
Read now
Unlock full access