import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
import java.net.URL;

public class Botones_Fotos2_code extends JFrame {

  public static void main(String[] args) {
      // Java look and feel
      //JFrame.setDefaultLookAndFeelDecorated(true);
     new Botones_Fotos2_code();
   }

  public Botones_Fotos2_code() {
   super("Botones_Fotos2_code");
   //super();
   // cerrar la ventana sin salir del programa
   this.setDefaultCloseOperation ( JFrame.DISPOSE_ON_CLOSE );
   // ocultar la ventana sin cerrarla
   //this.setDefaultCloseOperation ( JFrame.HIDE_ON_CLOSE );
   JPanel panel = new JPanel(new BorderLayout());
   //this.setTitle("Botones_Fotos2_code");
   this.getContentPane().add(panel);
   this.setSize(700,540);

   JEditorPane editorPane = new JEditorPane();
   editorPane.setEditable(false);
   URL url = Botones_Fotos2_code.class.getResource("code/Botones_Fotos2_code.java.html");
   // también puede ser
   //URL url = this.getClass.getResource("code/Botones_Fotos2_code.java.html");
   if (url != null) {
     try {
       editorPane.setPage(url);
        }
     catch (IOException e) 
       {
         JOptionPane.showMessageDialog(null,
                     "Error al leer " + url,
                     "IOException",
                     JOptionPane.PLAIN_MESSAGE);   
       }
   }
   else {
       JOptionPane.showMessageDialog(null,
                  "No se encuentra el archivo Java_code.html",
                  "FileNotFoundException",
                  JOptionPane.PLAIN_MESSAGE);   
       //return;
     }

   //Put the editor pane in a scroll pane.
   JScrollPane editorScrollPane = new JScrollPane(editorPane);
   editorScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
   editorScrollPane.setPreferredSize(new Dimension(760, 540));
   editorScrollPane.setMinimumSize(new Dimension(10, 10));

   panel.add(editorScrollPane, BorderLayout.CENTER);

    //show window
   //pack();
   setLocationRelativeTo(null);
   setResizable(false);
   setVisible(true);
   }

}