code: public final void setTitle(final String title) {
          if (SwingUtilities.isEventDispatchThread()) {
              setTitleIntern(title);
          } else {
              try {
                  SwingUtilities.invokeLater(new Runnable() {
                      public void run() {
                          setTitleIntern(title);
                      }
                  });
              } catch (final Exception ex) {
                  ignore();
              }
          }
      }
docs: Sets the title inside the panel. If called outside the EDT this method
  will switch to the UI thread using
  <code>SwingUtilities.invokeLater(Runnable)</code>.
  
  @param title
  Title.