import java.awt.*;
import java.applet.*;
import java.util.Scanner;
import java.io.*;
public class SuperSaver extends Applet
{
TextField inputField;
Button saveButton;
Button clearButton;
Label titleLabel;
public void init()
{
setLayout(null);
titleLabel = new Label("Super saver");
titleLabel.reshape(260,20,80,30);
add(titleLabel);
inputField = new TextField();
inputField.reshape(100,60,400,100);
add(inputField);
saveButton = new Button("SAVE");
saveButton.reshape(100,175,70,30);
add(saveButton);
clearButton = new Button("CLEAR");
clearButton.reshape(430,175,70,30);
add(clearButton);
resize(600,300);
}
public boolean handleEvent(Event event)
{
if (event.target == saveButton && event.id == Event.ACTION_EVENT)
{
PrintStream outwrite = new PrintStream(new FileOutputStream("Saver.txt"));
String xxx = inputField.getText();
outwrite.println(xxx);
return true;
}
return super.handleEvent(event);
}
}
where must i put the throw Exception,if i haven't had the file saver.txt????