home *** CD-ROM | disk | FTP | other *** search
/ Australian PC Authority 1999 May / may1999.iso / May / JBUILDER / JSAMPLES.Z / SwingSet$10.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-04-30  |  1.7 KB  |  30 lines

  1. import com.sun.java.swing.JOptionPane;
  2. import com.sun.java.swing.preview.JFileChooser;
  3. import com.sun.java.swing.preview.TypedFile;
  4. import java.awt.event.ActionEvent;
  5. import java.awt.event.ActionListener;
  6.  
  7. final class SwingSet$10 implements ActionListener {
  8.    // $FF: synthetic field
  9.    private final SwingSet this$0;
  10.  
  11.    public void actionPerformed(ActionEvent var1) {
  12.       JFileChooser var2 = new JFileChooser();
  13.       int var3 = var2.showDialog(this.this$0);
  14.       if (var3 == 0) {
  15.          TypedFile var4 = var2.getSelectedFile();
  16.          if (var4 != null) {
  17.             JOptionPane.showMessageDialog(this.this$0, "You chose this file: " + var2.getSelectedFile().getName());
  18.             return;
  19.          }
  20.       }
  21.  
  22.       JOptionPane.showMessageDialog(this.this$0, "No file chosen");
  23.    }
  24.  
  25.    // $FF: synthetic method
  26.    SwingSet$10(SwingSet var1) {
  27.       this.this$0 = var1;
  28.    }
  29. }
  30.