From 75c25fe5aee699b7d35535866180214af80db0d3 Mon Sep 17 00:00:00 2001 From: Robert Vokac Date: Sat, 3 Feb 2024 23:15:17 +0000 Subject: [PATCH] New improvements --- src/main/java/rvc/timecalc/TimeCalcWindow.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/rvc/timecalc/TimeCalcWindow.java b/src/main/java/rvc/timecalc/TimeCalcWindow.java index 14ec2ef..0e6f719 100644 --- a/src/main/java/rvc/timecalc/TimeCalcWindow.java +++ b/src/main/java/rvc/timecalc/TimeCalcWindow.java @@ -176,7 +176,7 @@ public class TimeCalcWindow { .setBounds(280, text.getY() + text.getHeight() + 10, 100, 30); exitButton.setBounds(390, text.getY() + text.getHeight() + 10, 100, 30); - focusButton.setBounds(exitButton.getX() + 10 + 10 + 10 + exitButton.getWidth() + 20, 10, 40, 30); + focusButton.setBounds(exitButton.getX() + 10 + 10 + 10 + exitButton.getWidth() + 20, 10, 60, 30); window.setSize(520 + 20 + 100, 580); window.setLayout(null); @@ -550,6 +550,9 @@ public class TimeCalcWindow { int spacesTotal = 48; int spacesDone = (int) (percent * spacesTotal); + if(spacesDone > spacesTotal) { + spacesDone = spacesTotal; + } int spacesTodo = spacesTotal - (spacesDone < 0 ? 0 : spacesDone); sb.append("||" + createSpaces(spacesTotal + 6 - 2) + (spacesTodo == 0 ?