code: private void resizeStaticText() {
          double maxWidth = width * 0.28472222;
          double fontSize = height * 0.12631579;
  
          minValueText.setFont(Fonts.latoRegular(fontSize));
          if (minValueText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(minValueText, maxWidth, fontSize); }
          minValueText.relocate((width * 0.28472222) - minValueText.getLayoutBounds().getWidth(), height * 0.885);
  
          maxValueText.setFont(Fonts.latoRegular(fontSize));
          if (maxValueText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(maxValueText, maxWidth, fontSize); }
          maxValueText.relocate(width * 0.71527778, height * 0.885);
  
          maxWidth = width * 0.9;
          titleText.setFont(Fonts.latoRegular(fontSize));
          if (titleText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(titleText, maxWidth, fontSize); }
          titleText.relocate((width - titleText.getLayoutBounds().getWidth()) * 0.5, height * 0.95);
      }
docs: ******************** Resizing ******************************************