void (JComponent component) { myTextFg = component.getForeground(); myTextBg = component.getBackground(); myFont = component.getFont(); boolean setDefaultStatus = true; HintUtil.HintLabel label = UIUtil.findComponentOfType(component, HintUtil.HintLabel.class); if (label != null) { HintHint componentHintLabel = label.getHintHint(); if (componentHintLabel != null) { setBorderColor(componentHintLabel.getBorderColor()); setBorderInsets(componentHintLabel.getBorderInsets()); setComponentBorder(componentHintLabel.getComponentBorder()); setDefaultStatus = false; } } if (setDefaultStatus) { setStatus(HintHint.Status.Info); } Object insets = component.getClientProperty(OVERRIDE_BORDER_KEY); if (insets instanceof Insets border) { setBorderInsets(border); } }