Fixed BUG0005

This commit is contained in:
mmk2410 2015-01-04 19:33:01 +01:00
parent 7f13ad0ce6
commit c99d23eafd

View file

@ -796,12 +796,15 @@ public class Morse extends JFrame {
tfOutput.setText(" ");
After();
} else if (input.toString().equals("WORD SPACE")) {
tfOutput.setText(" ");
tfOutput.setText(" ");
After();
} else {
for (int c = input.length(); c > 0; c--) {
if (input.toString().startsWith(" ")) {
output.append(" ");
if(output.toString().endsWith(" ")){
output.delete(output.length() - 3 , output.length());
}
output.append(" ");
input.delete(0, 1);
} else if (input.toString().startsWith("A")) {
output.append(".- ");
@ -1001,7 +1004,7 @@ public class Morse extends JFrame {
boolean signFull = true;
StringBuffer sign = new StringBuffer();
while (signFull) {
if (inputToSign.toString().startsWith(" ")) {
if (inputToSign.toString().startsWith(" ")) {
output.append(" ");
inputToSign.delete(d, d + 9);
} else if (inputToSign.toString().substring(d, d + 3)