// Applet mit Dateiwahl
// Ablauf hängt von der Sicherheisteinstellung ab
// <applet code=JDatei.class height=400 width=500> </applet>

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class JDatei extends JApplet
{

public void init()
{
JFileChooser chooser = new JFileChooser();  

int returnVal = chooser.showOpenDialog(this); 
if(returnVal == JFileChooser.APPROVE_OPTION) 
   {
    System.out.println("You chose to open this file: " + chooser.getSelectedFile().getName()); 
   } 
}

}
