FileDocCategorySizeDatePackage
PickleSaver.javaAPI DocExample1048Tue Jun 03 23:33:38 BST 1997None

PickleSaver

public class PickleSaver extends Applet

Fields Summary
Constructors Summary
Methods Summary
public voidinit()

     // create an instance of PickleButton
     PickleButton b = new PickleButton();

     // set the properties
     Font ft = new Font("System", Font.BOLD, 36);
     b.setFont(ft);
     b.setLabel("Sour Pickle");
    
     // serialize the pickle button
     try
     {
        FileOutputStream f = new FileOutputStream("PickleButton.ser");
        ObjectOutputStream s = new ObjectOutputStream(f);
        s.writeObject(b);
        s.flush();
     }
     catch (Exception e)
     {
        System.out.println(e);
     }
     add(b);