I have this code:
this.trigger = new Trigger();
this.presentationModel = new PresentationModel(this.personBean, this.trigger);
final ValueModel firstNameAdapter = presentationModel.getBufferedModel("firstName");
final JTextField firstNameTextField = BasicComponentFactory.createTextField(firstNameAdapter);
and
firstNameTextField.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
trigger.triggerCommit();
}
});
So when I push the enter button on the JTextField
, I expect the value in my ValueModel
class to be the same as the value in my JTextField
. This doesn't happen unless I click outside the JTextField
, then back inside the JTextField
, and then push enter. If I just type in the text and hit enter, the ValueModel
does not get the updated value. I am stuck on this problem, can anybody help?
BTW, I used this link for figuring out JGoodies in the first place: JGoodies Tutorial