code: private void zApplyBorderPropertiesInstance(CalendarBorderProperties borderProperties) {
          Point ul = borderProperties.upperLeft;
          Point lr = borderProperties.lowerRight;
          Color color = borderProperties.backgroundColor;
          Integer thickness = borderProperties.thicknessInPixels;
          if ((ul == null) || (lr == null) || (ul.x < 1) || (ul.x > 5) || (ul.y < 1) || (ul.y > 5)
              || (lr.x < 1) || (lr.x > 5) || (lr.y < 1) || (lr.y > 5) || (ul.x > lr.x)
              || (ul.y > lr.y)) {
              throw new RuntimeException("CalendarPanel.setBorderProperties(), "
                  + "The supplied points cannot be null, and they must have x and y "
                  + "coordinates with values in the range of 1 to 5 (inclusive). Additionally, "
                  + "the upper left point values must be less than or equal to the lower right "
                  + "point values.");
          }
          for (int x = ul.x; x <= lr.x; ++x) {
              for (int y = ul.y; y <= lr.y; ++y) {
                  JLabel borderLabel = borderLabels[x][y];
                  if (borderLabel == null) {
                      continue;
                  }
                  if (color != null) {
                      borderLabel.setBackground(color);
                  }
                  if (thickness != null) {
                      boolean isVisible = (thickness > 0);
                      borderLabel.setVisible(isVisible);
                      Dimension minimumSize = (isVisible)
                          ? new Dimension(thickness, thickness) : new Dimension(1, 1);
                      borderLabel.setMinimumSize(minimumSize);
                  }
              }
          }
      }
docs: zApplyBorderPropertiesInstance, This will apply the supplied border properties instance to
  this calendar. See the CalendarBorderProperties class for information about the meaning of
  the border properties instance fields. This function should only be called from the
  CalendarPanel.zAppliedBorderPropertiesList() function.
  
  This function will throw an exception if the border coordinates are outside the valid range
  (1 to 5), or if the lowerRight point has smaller coordinate values than the upperLeft point.