private static @Nls String trimMessage(@Nls String message, JComponent c) {
    String[] words = message.split("\\s+");
    @Nls StringBuilder result = new StringBuilder();

    for(String word : words) {
      word = SwingUtilities2.clipStringIfNecessary(c, c.getFontMetrics(c.getFont()), word, MAX_WIDTH.get());
      result.append(word).append(" ");
    }

    return result.toString();
  }
private static @Nls String trimMessage(@Nls String message, JComponent c)