code: public void renderMessage(JComponent component) {
          if (component instanceof JTextComponent) {
              ((JTextComponent)component).setText(getMessage());
          }
          else if (component instanceof JLabel) {
              JLabel label = (JLabel)component;
              label.setText(LabelUtils.htmlBlock(getMessage()));
              label.setIcon(getIcon());
          }
          else {
              throw new IllegalArgumentException("Unsupported component type " + component);
          }
      }
docs: Renders this message on the given GUI component. This implementation only
  supports components of type {@link javax.swing.text.JTextComponent} or {@link javax.swing.JLabel}.
  
  @throws IllegalArgumentException if {@code component} is not a {@link javax.swing.text.JTextComponent}
  or a {@link javax.swing.JLabel}.