Fixed BUG0005
This commit is contained in:
parent
7f13ad0ce6
commit
c99d23eafd
1 changed files with 6 additions and 3 deletions
|
@ -796,12 +796,15 @@ public class Morse extends JFrame {
|
||||||
tfOutput.setText(" ");
|
tfOutput.setText(" ");
|
||||||
After();
|
After();
|
||||||
} else if (input.toString().equals("WORD SPACE")) {
|
} else if (input.toString().equals("WORD SPACE")) {
|
||||||
tfOutput.setText(" ");
|
tfOutput.setText(" ");
|
||||||
After();
|
After();
|
||||||
} else {
|
} else {
|
||||||
for (int c = input.length(); c > 0; c--) {
|
for (int c = input.length(); c > 0; c--) {
|
||||||
if (input.toString().startsWith(" ")) {
|
if (input.toString().startsWith(" ")) {
|
||||||
output.append(" ");
|
if(output.toString().endsWith(" ")){
|
||||||
|
output.delete(output.length() - 3 , output.length());
|
||||||
|
}
|
||||||
|
output.append(" ");
|
||||||
input.delete(0, 1);
|
input.delete(0, 1);
|
||||||
} else if (input.toString().startsWith("A")) {
|
} else if (input.toString().startsWith("A")) {
|
||||||
output.append(".- ");
|
output.append(".- ");
|
||||||
|
@ -1001,7 +1004,7 @@ public class Morse extends JFrame {
|
||||||
boolean signFull = true;
|
boolean signFull = true;
|
||||||
StringBuffer sign = new StringBuffer();
|
StringBuffer sign = new StringBuffer();
|
||||||
while (signFull) {
|
while (signFull) {
|
||||||
if (inputToSign.toString().startsWith(" ")) {
|
if (inputToSign.toString().startsWith(" ")) {
|
||||||
output.append(" ");
|
output.append(" ");
|
||||||
inputToSign.delete(d, d + 9);
|
inputToSign.delete(d, d + 9);
|
||||||
} else if (inputToSign.toString().substring(d, d + 3)
|
} else if (inputToSign.toString().substring(d, d + 3)
|
||||||
|
|
Reference in a new issue