buttonPane.add(cancelButton);
}
}
{
JPanel execPath=new JPanel();
txtExecPath = new XBayaTextField();
txtExecPath.getTextField().addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
setExecutablePath(txtExecPath.getText());
}
});
txtExecPath.getTextField().addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
super.focusLost(e);
updateTempDirWithExecPath(txtExecPath.getText());
}
});
txtExecPath.setColumns(10);
btnExecBrowse=new JButton(MenuIcons.OPEN_ICON);
btnExecBrowse.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent arg0) {
JFileChooser c = new JFileChooser();
int rVal = c.showOpenDialog(null);
if (rVal == JFileChooser.APPROVE_OPTION) {
txtExecPath.setText(c.getSelectedFile().toString());
setExecutablePath(txtExecPath.getText());
}
}
});
execPath.add(txtExecPath.getSwingComponent());
execPath.add(btnExecBrowse);
setupLayoutForBrowse(execPath,txtExecPath.getSwingComponent());
JLabel lblExecutablePath = new JLabel("Executable path");
JPanel tmpDirPath=new JPanel();
txtTempDir = new XBayaTextField();
txtTempDir.getTextField().addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
setTempDir(txtTempDir.getText());
}