After user enter the number in the textfield and clicking on the button, I want to return the value in another textfield, I am not sure what class do I need for it, any hints please? thank you so much and here is my code:

```
private void newNumber(Container container){
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints constraint = new GridBagConstraints();
    //add the new number
    labelname = new JLabel("Enter the number: ");
    constraint.gridx = 0;
    constraint.gridy = 0;
    panel.add(labelname, constraint);

    number= new JTextField(10);
    constraint.gridx = 1;
    constraint.gridy = 0;
    panel.add(number, constraint);

    addnumber = new JButton("Add number");
    constraint.gridx = 0;
    constraint.gridy = 3;
    panel.add(addnumber, constraint);

    container.add(panel,"North");

}

```

I know it should have a method about ActionListener but I am still figuring it out :)