enter.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
User = input.getText();
if (User == "hello") {
Console = "Hi User!";
}
output.setText("User: " + User + "\n" + "Console: " + Console);
}
});
When I run it, it displays the text on the GUI. But why is it that the console doesn't respond. I did a system.out.prinln on User when I wrote "hello" Thats exactly hat it said, why is this if statement not working?