mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-20 01:12:13 +02:00
Fix time & attempts labels getting disabled
This commit is contained in:
parent
5569499262
commit
9f0ccc43b3
@ -65,8 +65,8 @@ public class ForceOpDialog extends JDialog
|
||||
|
||||
addLabel("Username: " + username, 4, 140);
|
||||
lPasswords = addLabel("Passwords: error", 4, 160);
|
||||
lTime = addLabel("Estimated time: error", 4, 180);
|
||||
lAttempts = addLabel("Attempts: error", 4, 200);
|
||||
lTime = addPersistentLabel("Estimated time: error", 4, 180);
|
||||
lAttempts = addPersistentLabel("Attempts: error", 4, 200);
|
||||
addStartButton();
|
||||
|
||||
updateNumPasswords();
|
||||
@ -231,12 +231,27 @@ public class ForceOpDialog extends JDialog
|
||||
}
|
||||
|
||||
private JLabel addLabel(String text, int x, int y)
|
||||
{
|
||||
JLabel label = makeLabel(text, x, y);
|
||||
add(label);
|
||||
return label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a label that won't be disabled when the Start button is pressed.
|
||||
*/
|
||||
private JLabel addPersistentLabel(String text, int x, int y)
|
||||
{
|
||||
JLabel label = makeLabel(text, x, y);
|
||||
super.add(label);
|
||||
return label;
|
||||
}
|
||||
|
||||
private JLabel makeLabel(String text, int x, int y)
|
||||
{
|
||||
JLabel label = new JLabel(text);
|
||||
label.setLocation(x, y);
|
||||
label.setSize(label.getPreferredSize());
|
||||
|
||||
add(label);
|
||||
return label;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user