TestAppletDialog.java
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;

public class TestAppletDialog extends Applet
                         implements ActionListener{
     private Button bAbout;
     private SemiAboutDialog sad;
    
     public void init(){
         bAbout = new Button("about");
         add(bAbout);
         bAbout.addActionListener(this);
     }
     public void actionPerformed(ActionEvent e)
     {
         if(e.getSource() == bAbout){
         // test op nullwaarde van sad, om te
         // zorgen dat alleen een dialoog geopend
         // wordt, als er nog geen open is
             if (sad == null)
                 sad = new SemiAboutDialog(this);
         }
     }
     public void nullWindow(){
         // de dialoog wordt gesloten:
         // maak sad null, zodat er weer een
         // nieuwe dialoog geopend kan worden
         sad = null;
     }
}

class SemiAboutDialog extends Frame{
     final TestAppletDialog tad;
      
       SemiAboutDialog(TestAppletDialog TAD){
          
           super("Applet About Demo");
           tad = TAD;
           setLayout(new FlowLayout());
           add(new Label("Hier had info over het"));
           add(new Label("programma kunnen staan!"));
           addWindowListener(new WindowAdapter() {
               public void windowClosing(
                                      WindowEvent e) {
                   dispose();
                   tad.nullWindow();
               }
           });
           setSize(180, 110);
           setLocation(50, 100);
           show();
       }
}