posted 17 years ago
hi sorry about that
here is the code again:
JButton bbtSave = new JButton("Save");
bbtSave.setBackground(Color.RED);
bbtSave.addActionListener(new bbtSave_actionAdapter(this));
panel1.add(bbtSave);
class bbtSave_actionAdapter implements java.awt.event.ActionListener {
AddPersonsData adaptee;
bbtSave_actionAdapter(AddPersonsData adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.saveData(e);
}
}