package traduccion;
import java.awt.Canvas;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import java.net.URL;
import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.JPanel;

/**
 * <p>Title: Hola a todos</p>
 *
 * <p>Description: este es el tutorial hola a todos</p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: Mi empresa</p>
 *
 * @author Mi nombre
 * @version 1.0
 */
public class Dibujar extends Canvas {
    public static final int WIDTH = 300;
    public static final int HEIGHT = 400;
    public BufferedImage bicho = null;

    public Dibujar() {
        try {
            jbInit();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    public static void main(String[] args) {
        Dibujar dibujar = new Dibujar();
    }

    private void jbInit() throws Exception {
       JFrame ventana = new JFrame("Diagramas");
       JPanel panel = (JPanel)ventana.getContentPane();
       setBounds(0,0,WIDTH,HEIGHT);
        panel.setPreferredSize(new Dimension(WIDTH,HEIGHT));
        panel.setLayout(null);
        panel.add(this);
        ventana.setBounds(0,0,WIDTH,HEIGHT);
        ventana.setVisible(true);
        ventana.addWindowListener( new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
          }
        });

    }
}
