Add an ActionListener to the instance of the JButton, get the content of the JTextField (say with name aTextField), and store it to a list (say you have a class member JList dataInputted )
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
// Execute when button is pressed
dataInputted.addElement(aTextField.getText());
}
});