void (ComponentEvent e) { final String optimalTextForComponent = FilePathSplittingPolicy.SPLIT_BY_SEPARATOR.getOptimalTextForComponent(myFile, myLabelToClip, myComponentToWatch.getWidth()); myLabelToClip.setText(optimalTextForComponent); }