As a part of my program, I just want to print out what the user enters in the jTextField
here is what I do, but does not work at all.
JTextField myInput = new JTextField();
String word = myInput.getText();
myInput.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
{
System.out.print(word);
}
});
Any idea?