ciao nn mi funziona, l'istruzione che mi hai dato, questo è il mio codice:



class SimpleFrame extends JFrame implements ActionListener {
JTextField t = new JTextField("ci sono riuscito");
JLabel l = new JLabel("ciao");
JFrame frame = new JFrame();
JFrame f = new JFrame();
JButton b = new JButton("Apri");
SimpleFrame() {
super();
setTitle("ScriptManager");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().add(l);
getContentPane().add(b);
setSize(new Dimension(350, 120));
b.addActionListener(this);//la funziona this attiva l'implements'
pack();
setVisible(true);
}


public static void main(String[] args) {
SimpleFrame sf = new SimpleFrame();

}
public void actionPerformed(ActionEvent e) {

JFileChooser c = new JFileChooser();
f.getContentPane().add(c);
c.showOpenDialog(this);
}