public void cargarImagen(javax.swing.JDesktopPane jDeskp, File file) {
   try {
     BufferedImage image = ImageIO.read(file);
     jDeskp.setBorder(new com.epissoft.sanguchito.vista.utilitarios.pintaImagen(image));
   } catch (Exception e) {
     JOptionPane.showMessageDialog(this, "No se ha cargado la imagen");
   }
 }
  /** Constructs a new desktop. */
  public TetradDesktop() {
    setBackground(new Color(204, 204, 204));
    sessionNodeKeys = new ArrayList();
    // Create the desktop pane.
    this.desktopPane = new JDesktopPane();

    // Do layout.
    setLayout(new BorderLayout());
    desktopPane.setDesktopManager(new DefaultDesktopManager());
    desktopPane.setBorder(new BevelBorder(BevelBorder.LOWERED));
    desktopPane.addPropertyChangeListener(this);

    this.setupDesktop();
    TetradLogger.getInstance().addTetradLoggerListener(new LoggerListener());
  }