I want to create a working JTextField that check the input and compare it with a string or an int like:
JTextField tf = new JTextField(); if(tf.getText()=="code"){ System.out.println("Code works")} //That doesnt work
It can work with a String or a int but I dont know how can I code it.