score:2

Accepted answer

btnencrypt's actionlistener is not correctly implemented. when the actionlistener is called, first you should gettext() from textfield and store it to string variable text. then you should apply encryption to text and finally set the encrypted text (password) to textfield_1. this should be like this.

 btnencrypt.addactionlistener(new actionlistener() {
        public void actionperformed(actionevent arg0) {

            for (int i = 0; i < password.length(); i++) {
                int temp = 0;
                temp = (int) password.charat(i);
                temp = temp * 9834 / 8942 / 33 * 90023243 * 9 + 124324534 - 2335;
                password.setcharat(i, (char) temp);

            }
            textfield_1.settext(password.tostring());

        }
    });

Related Query

More Query from same tag