code: public static DOTComponent createDOTComponent(Reader r) {
          try {
              return new DOTComponent(r);
          } catch (IOException e) {
              JOptionPane.showMessageDialog(null,
                                            "Could not run DOT: " + e.getMessage(),
                                            "Failed to run DOT",
                                            JOptionPane.ERROR_MESSAGE);
              return null;
          }
      }
docs: Creates a {@link DOTComponent} that displays the result of rendering a DOT description read from a {@link
  Reader}.
  
  @param r
  the reader to read from
  
  @return the DOT component