hashing works only if the applet have to authenticate the password received... if the applet is the client trying to authenticate in some site hashing will not work...
if your applet is the client you can write a very complicated encripting function, that uses lots of objects reading the properties one of another...
e.g.
(translate this to java...

)
obj1.setprop1(0x0f0f90f XOR 0x293f)
obj2.setprop1(0x9877f XOR 734)
...
pass = substring(obj1.getprop1(), 2,4) + (obj2.getprop1 XOR obj3.classname) + ...
then even if someone decompile your script will be very very hard to discover your password...