-
Bug
-
Resolution: Fixed
-
P2
-
1.3.1
-
None
-
beta
-
sparc
-
solaris_7
The "OK" button in the JFileChooser does not resond to keyboard accelerator key "ALT+O". The "Update" and "Cancel" buttons react to "ALT+U" and "ALT+C", respectively. Java 1.3.1
Test case:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JFCTest extends JFrame {
public JFCTest() {
JButton j = new JButton("Open");
this.getContentPane().add(j);
j.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
openDialog();
}
});
}
private void openDialog() {
JFileChooser jfc = new JFileChooser();
jfc.showOpenDialog(this);
}
public static void main(String args[]) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception ex) {}
JFCTest j = new JFCTest();
j.setSize(100,100);
j.setVisible(true);
}
}
Test case:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JFCTest extends JFrame {
public JFCTest() {
JButton j = new JButton("Open");
this.getContentPane().add(j);
j.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
openDialog();
}
});
}
private void openDialog() {
JFileChooser jfc = new JFileChooser();
jfc.showOpenDialog(this);
}
public static void main(String args[]) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception ex) {}
JFCTest j = new JFCTest();
j.setSize(100,100);
j.setVisible(true);
}
}