can someone explain to me why this isnt working? It is supposed to show the next form if the username is correct and it doesnt work. What am I doing wrong here?

Code:
 private void btnLoginMouseClicked(java.awt.event.MouseEvent evt) {                                      

        if(txtUsername.getText() == "jeff"){
            //If login is successful, load main frame
            MainFrame newMainFrame = new MainFrame();

            newMainFrame.setVisible(true);

            this.dispose();
        }        
       
 }
I did a System.out.println(txtUsername.getText()); before the if statement and it did show up. I don't understand why the code in the if statement is not being executed. Thanks.