Hi
Thanks for your code. As you said I have created the ActionListener, then I tried to get the text and store it in the array list that I had created. Bu the problem is that when i do all this I can not see any change. Here is my modified part of the code. Please help.
Code:
btnew= new JButton("Add Contact");
panel2.add(btnew);
btnew.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
if (event.getActionCommand().equals("ADD"))
records.add(new Record(txtName.getText(), txthomeTel.getText(), txtmobileTel.getText(), txtAddress.getText()));
}
Any comments on this.
Bookmarks