So i'm a beginner in java and i've been encountering this problem on cmd, whenever i try to show my jframe in cmd i've been getting this note "uses or overrides deprecated API" and "recompile with -Xlint..". When i tried to erase the action listener of my enter button the jframe shows and works so i thought that it might be the code in enter.addActionListener is the problem. thank you.
enter.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
String userText;
String pwdText;
userText = uss.getText();
pwdText = pss.getText();
if (userText.equals("user") && pwdText.equals("pass")) {
JOptionPane.showMessageDialog(null, "Login
Successful","Message",JOptionPane.PLAIN_MESSAGE);
}
else {
JOptionPane.showMessageDialog(null, "Invalid Username or
Password","Message",JOptionPane.PLAIN_MESSAGE);
}
}
});