public void actionPerformed(ActionEvent ae) { String cmd = ae.getActionCommand(); if (JOkCancelPanel.OK.equals(cmd)) { // update evaluator evaluator.name = tfName.getText(); evaluator.type = (byte) cbType.getSelectedIndex(); evaluator.ignoreDiagonals = cbDiagonals.isSelected(); evaluator.investments = (byte) cbInvestment.getSelectedIndex(); evaluator.orgFile = orgFile; setVisible(false); } else if (JOkCancelPanel.CANCEL.equals(cmd)) { // don't update evaluator setVisible(false); } else if (CMD_CHOOSE_FILE.equals(cmd)) { // get a file dialog JFrame f = new JFrame(); JFileChooser jfc = Application.getFileChooser(); int res = jfc.showOpenDialog(f); Application.setWorkingDirectory(jfc.getCurrentDirectory()); if (res == JFileChooser.CANCEL_OPTION) { return; } orgFile = jfc.getSelectedFile(); lOrgFileName.setText("File: " + orgFile.getName()); } }