Component (Container aContainer, Component aComponent) { if (aContainer instanceof EditorTextField) { int count = aContainer.getComponentCount(); if (count > 1 && aComponent != aContainer.getComponent(count - 1)) { return getDefaultComponent(aContainer); } } invokedFromBeforeOrAfter = true; Component after; try { after = super.getComponentAfter(aContainer, aComponent); } finally { invokedFromBeforeOrAfter = false; } return after != aComponent? after: null; // escape our container }