im developing a language converter
so i want to do like this
source | target (this is only example)
aa | q
bb | w
cc | e
im using netbeans ide
i have a one textfield for input strings and textarea(i used textarea becoz i dont know how to append textfield) to display converted string
this is my code
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String source ;
source=jtextfield1.getText();
jtextArea1.append(source.replace("aa", "q"));
jtextArea1.append(source.replace("bb", "w"));
jtextArea1.append(source.replace("cc", "e"));
}
this dosent work
if i input aabb i get qbbaaw
i want qw
how to fix this????
plzz help me