jButton4.setText("jButton4");
jButton4.addActionListener(new Frame1_jButton4_actionAdapter(this));
void jButton4_actionPerformed(ActionEvent e) {
javax.swing.JFileChooser fc =new javax.swing.JFileChooser();
fc.showOpenDialog(this);
System.out.println("你选择的文件是:"+fc.getSelectedFile().getName());
}
class Frame1_jButton4_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jButton4_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton4_actionPerformed(e);
}