if(e.getActionCommand().equals("Şifrele")){
ceviri.setText(metin.getText());
ksayi = metin.getText().length();
String harfler [] = new String[ksayi];
for(int de = 0; de < ksayi; de++){
harfler[de] = metin.getText().substring(de,de+1);
}
for(int si = 0; si <ksayi;si++){
switch (harfler[si]){
case "a": System.out.print( (q1+q2+q3+q4)*1 + ".");break;
case "b": System.out.print( (q1+q2+q3+q4)*2 + ".");break;
case "c": System.out.print( (q1+q2+q3+q4)*3 + ".");break;
case "ç": System.out.print( (q1+q2+q3+q4)*4 + ".");break;
case "d": System.out.print( (q1+q2+q3+q4)*5 + ".");break;
case "e": System.out.print( (q1+q2+q3+q4)*6+ ".");break;
case "f": System.out.print( (q1+q2+q3+q4)*7 + ".");break;
case "g": System.out.print( (q1+q2+q3+q4)*8 + ".");break;
case "ğ": System.out.print( (q1+q2+q3+q4)*9 + ".");break;
case "h": System.out.print( (q1+q2+q3+q4)*10 + ".");break;
case "ı": System.out.print( (q1+q2+q3+q4)*11 + ".");break;
case "i": System.out.print( (q1+q2+q3+q4)*12 + ".");break;
case "j": System.out.print( (q1+q2+q3+q4)*13 + ".");break;
case "k": System.out.print( (q1+q2+q3+q4)*14 + ".");break;
case "l": System.out.print( (q1+q2+q3+q4)*15 + ".");break;
case "m": System.out.print( (q1+q2+q3+q4)*16+ ".");break;
case "n": System.out.print( (q1+q2+q3+q4)*17 + ".");break;
case "o": System.out.print( (q1+q2+q3+q4)*18 + ".");break;
case "ö": System.out.print( (q1+q2+q3+q4)*19 + ".");break;
case "p": System.out.print( (q1+q2+q3+q4)*20 + ".");break;
case "r": System.out.print( (q1+q2+q3+q4)*21 + ".");break;
case "s": System.out.print( (q1+q2+q3+q4)*22 + ".");break;
case "ş": System.out.print( (q1+q2+q3+q4)*23+ ".");break;
case "t": System.out.print( (q1+q2+q3+q4)*24 + ".");break;
case "u": System.out.print( (q1+q2+q3+q4)*25 + ".");break;
case "ü": System.out.print( (q1+q2+q3+q4)*26 + ".");break;
case "v": System.out.print( (q1+q2+q3+q4)*27 + ".");break;
case "y": System.out.print( (q1+q2+q3+q4)*28 + ".");break;
case "z": System.out.print( (q1+q2+q3+q4)*29 + ".");break;
}
}
İlgilenen arkadaşlar için edit: Şöyle bir şey yaparak sorunumu çözdüm.