/** * Every time the UI needs to be replaced we also need to make sure, that all buddy * components are also in the component hierarchy. (That's because {@link BasicTextUI} * removes all our buddies upon UI changes). */ @Override protected boolean replaceUIIfNeeded(JTextComponent textComponent) { boolean replaced = super.replaceUIIfNeeded(textComponent); if (replaced && textComponent instanceof JTextField) { BuddySupport.ensureBuddiesAreInComponentHierarchy((JTextField) textComponent); } return replaced; } }
/** * Every time the UI needs to be replaced we also need to make sure, that all buddy * components are also in the component hierarchy. (That's because {@link BasicTextUI} * removes all our buddies upon UI changes). */ @Override protected boolean replaceUIIfNeeded(JTextComponent textComponent) { boolean replaced = super.replaceUIIfNeeded(textComponent); if (replaced && textComponent instanceof JTextField) { BuddySupport.ensureBuddiesAreInComponentHierarchy((JTextField) textComponent); } return replaced; } }
/** * Every time the UI needs to be replaced we also need to make sure, that all buddy * components are also in the component hierarchy. (That's because {@link BasicTextUI} * removes all our buddies upon UI changes). */ @Override protected boolean replaceUIIfNeeded(JTextComponent textComponent) { boolean replaced = super.replaceUIIfNeeded(textComponent); if (replaced && textComponent instanceof JTextField) { BuddySupport.ensureBuddiesAreInComponentHierarchy((JTextField) textComponent); } return replaced; } }
/** * Every time the UI needs to be replaced we also need to make sure, that all buddy * components are also in the component hierarchy. (That's because {@link BasicTextUI} * removes all our buddies upon UI changes). */ @Override protected boolean replaceUIIfNeeded(JTextComponent textComponent) { boolean replaced = super.replaceUIIfNeeded(textComponent); if (replaced && textComponent instanceof JTextField) { BuddySupport.ensureBuddiesAreInComponentHierarchy((JTextField) textComponent); } return replaced; } }