return pane;
}
private JPanel getCenterPane(){
JPanel pane = new JPanel();
NullLayout layout = new NullLayout(pane);
// arquivo de entrada
JLabel jlFileInput = new JLabel("Arquivo de Entrada: ");
this.jtfInputFile = new JTextField(12);
this.jbSelectInputFile = new JButton("Selecionar");
this.jbSelectInputFile.setCursor(new Cursor(Cursor.HAND_CURSOR));
this.jbSelectInputFile.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
int op = chooser.showOpenDialog(MainView.this);
if(op == JFileChooser.APPROVE_OPTION){
MainView.this.jtfInputFile.setText(chooser.getSelectedFile().getAbsolutePath());
}
}
});
// arquivo de sa�da
JLabel jlFileOutput = new JLabel("Arquivo de Sa�da: ");
this.jtfOutputFile = new JTextField(12);
this.jbSelectOutputFile = new JButton("Selecionar");
this.jbSelectOutputFile.setCursor(new Cursor(Cursor.HAND_CURSOR));
this.jbSelectOutputFile.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
int op = chooser.showOpenDialog(MainView.this);
if(op == JFileChooser.APPROVE_OPTION){
MainView.this.jtfOutputFile.setText(chooser.getSelectedFile().getAbsolutePath());
}
}
});
// senha
JLabel jlPassword = new JLabel("Senha: ");
this.jtfPassword = new JPasswordField(10);
// barra de progresso
this.bar = new JProgressBar();
// adicionando no layout
int labelWidth = 120;
int textWidth = 390;
int defaultHeight = 24;
layout.add(jlFileInput, labelWidth, defaultHeight);
layout.add(jtfInputFile, textWidth, defaultHeight);
layout.add(jbSelectInputFile, 100, defaultHeight);
layout.newLine();
layout.add(jlFileOutput, labelWidth, defaultHeight);
layout.add(jtfOutputFile, textWidth, defaultHeight);
layout.add(jbSelectOutputFile, 100, defaultHeight);
layout.newLine();
layout.add(jlPassword,labelWidth,defaultHeight);
layout.add(this.jtfPassword,textWidth,defaultHeight);
layout.newLine();
layout.add(this.bar,this.getSize().width-23,defaultHeight);
return pane;
}