better code
This commit is contained in:
parent
4e0f55fa02
commit
c723c1b9ff
2 changed files with 14 additions and 2 deletions
|
@ -334,9 +334,11 @@ public class MainGUI {
|
||||||
attemptslabel.setText("Attempts: " + data.getAttempts().get(index));
|
attemptslabel.setText("Attempts: " + data.getAttempts().get(index));
|
||||||
level.setVerticalAlignment(SwingConstants.CENTER);
|
level.setVerticalAlignment(SwingConstants.CENTER);
|
||||||
|
|
||||||
String levellength = data.getLevelLength().get(index);
|
|
||||||
lengthLabel.setText("Länge: lädt...");
|
lengthLabel.setText("Länge: lädt...");
|
||||||
|
|
||||||
|
String levellength = data.getLevelLength().get(index);
|
||||||
|
|
||||||
|
|
||||||
if(data.getLevelLength().get(index).equals("N/A")) {
|
if(data.getLevelLength().get(index).equals("N/A")) {
|
||||||
levellength = api.getLevelLength(Integer.parseInt(data.getLevelID().get(index)));
|
levellength = api.getLevelLength(Integer.parseInt(data.getLevelID().get(index)));
|
||||||
data.modifyData(data.getLevelname().get(index), comp[index], Integer.parseInt(attempts.getText()), lockbool[index], data.getPbarr().get(index), levellength);
|
data.modifyData(data.getLevelname().get(index), comp[index], Integer.parseInt(attempts.getText()), lockbool[index], data.getPbarr().get(index), levellength);
|
||||||
|
|
|
@ -40,7 +40,13 @@ public class SafeFileManager {
|
||||||
|
|
||||||
lengthComp.putAll(read.lengthMap);
|
lengthComp.putAll(read.lengthMap);
|
||||||
|
|
||||||
|
Thread thread = new Thread(new Runnable() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String attempts;
|
String attempts;
|
||||||
String percent;
|
String percent;
|
||||||
|
@ -66,6 +72,10 @@ public class SafeFileManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prog.close();
|
prog.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
thread.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue