//Create a file chooser
this.chooser = chooser;
- File sdir = new File(text);
- System.out.println("sdir="+ sdir.getAbsolutePath());
- if (sdir.exists()) {
- fc = new JFileChooser(sdir);
- }
- else {
- fc = new JFileChooser();
- }
-
- fc.setFileSelectionMode(chooser);
openButton = new JButton("選択...", AdjustTime.createImageIcon("images/Open16.gif"));
openButton.addActionListener(this);
public void actionPerformed(ActionEvent e) {
if (e.getSource() == openButton){
- fc = new JFileChooser(new File(this.argField.getText()));
- int returnVal = fc.showOpenDialog(ParameterPanelFolder.this);
+ System.out.println("ParameterPanelFolder.actionPerformed(openButton)");
+ File sdir = new File(this.argField.getText());
+ if (sdir.exists()) {
+ this.fc = new JFileChooser(sdir);
+ }
+ else {
+ this.fc = new JFileChooser();
+ }
+ this.fc.setFileSelectionMode(this.chooser);
+
+ int returnVal = this.fc.showOpenDialog(ParameterPanelFolder.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
- File file = fc.getSelectedFile();
+ File file = this.fc.getSelectedFile();
this.argField.setText(file.getAbsolutePath());
}
}