Code:
jb.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String txt= jtf.getText();
jcb.addItem(txt);
}
});
Where jb is the JButton, jtf the text field and jcb the combo box.
The text field and the combo box must be either constants or global variables. In that case it's better if you make them global as you won't be able to edit the combo box if it's a constant.
If you want the complete program PM and I'll give it to you.