All pastes #797552 Raw Edit

dsa

public text v1 · immutable
#797552 ·published 2007-11-26 02:38 UTC
rendered paste body
package PixConvx;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;

public class FileChooser extends JFrame {
	public FileChooser(){
	JFileChooser fc = new JFileChooser();    
	// restringe a amostra a diretorios apenas
	fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
	    int res = fc.showOpenDialog(null);
	    
	    if(res == JFileChooser.APPROVE_OPTION){
	    File arquivo = fc.getSelectedFile();
	    Conversor Conversor = new Conversor(arquivo.getAbsolutePath());	
	    
	    	//JOptionPane.showMessageDialog(null, "Agora, escolha o destino do arquivo final.");
	    } else {
	        JOptionPane.showMessageDialog(null, "Voce nao escolheu nenhum arquivo"); 
		}
	}
}