sourcefc = new JFileChooser();
sourcefc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
targetfc = new JFileChooser();
targetfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
GridBagConstraints constraint;
JPanel pane = new JPanel();
pane.setLayout(new GridBagLayout());
JLabel srclbl = new JLabel("Source file/dir:");
constraint = new GridBagConstraints();
constraint.gridx = 0;
constraint.gridy = 0;
pane.add(srclbl, constraint);
source = new JTextField(FILEFIELDSIZE);
constraint = new GridBagConstraints();
constraint.gridx = 1;
constraint.gridy = 0;
pane.add(source, constraint);
srcbutton = new JButton("Choose");
constraint = new GridBagConstraints();
constraint.gridx = 2;
constraint.gridy = 0;
pane.add(srcbutton, constraint);
srcbutton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
srcbuttonActionPerformed(evt);
}
});
JLabel targetlbl = new JLabel("Target file/dir:");
constraint = new GridBagConstraints();
constraint.gridx = 0;
constraint.gridy = 1;
pane.add(targetlbl, constraint);
target = new JTextField(FILEFIELDSIZE);
constraint = new GridBagConstraints();
constraint.gridx = 1;
constraint.gridy = 1;
pane.add(target, constraint);
targetbutton = new JButton("Choose");
constraint = new GridBagConstraints();
constraint.gridx = 2;
constraint.gridy = 1;
pane.add(targetbutton, constraint);
targetbutton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {