Yoe are welcome. I would try a HashMap with the regular words as keys and the encrypted ones as values. Read the link for further information.
Type: Posts; User: andreas90
Yoe are welcome. I would try a HashMap with the regular words as keys and the encrypted ones as values. Read the link for further information.
The "encrypted" word is set inside every if statement. I talk about the statement
jtfResult.setText(display + "" + "" + ""); which is BEFORE the if statements.
The way it is your code now when the...
Did you print what is being tested (ie jtfResult.getText())?
What is the purpose of the statement
jtfResult.setText(display + "" + "" + "");
Why don't you test directly the textfield's text?
I can see two problems in your code. Firstly, you didn't follow my hint in post #2. Your if statements are wrong. They don't have an error but the semicolon in the end of them is a logic error. Try...
Can you show the code you tried? Or better a sample of it that shows the problem and can be executed without errors?
Hello maxattack!
You have some logic errors (probably by mistake).
if (jtfResult.getText().equals("d"));
.
.
.