code: public void paintBorder(Component component,
                              Graphics graphics,
                              int x,
                              int y,
                              int width,
                              int height)
      {
          if (top)
          {
              graphics.fillRect(x, y, width, thickness);
          }
          if (bottom)
          {
              graphics.fillRect(x, y + height - thickness, width, thickness);
          }
          if (left)
          {
              graphics.fillRect(x, y, thickness, height);
          }
          if (right)
          {
              graphics.fillRect(x + width - thickness, y, thickness, height);
          }
      }
docs: Renders borders for the specified component based on the configuration
  of this border object.
  @param component The component for which the border is painted.
  @param graphics A {@link Graphics} object to use for painting.
  @param x The X-coordinate of the top left point of the border rectangle.
  @param y The Y-coordinate of the top left point of the border rectangle.
  @param width The width of the border rectangle.
  @param height The height of the border rectangle.