/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Capitulo_6.Dibujo3;

import java.awt.BorderLayout;
import java.awt.GridLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;

/**
 *
 * @author felix
 */

public class MiPaint extends JFrame{
    private final Botones misBotones;
    private final SeleccionPanel miSeleccion;
    private final Lienzo miLienzo; 
    
    public MiPaint() {
        super("Mis Dibujos");
        JPanel AreaControl = new JPanel(new GridLayout(2,1));
        misBotones = new Botones("Figuras", 
                new String[] {"Linea", "Cuadro", "Rectangulo", "Circulo", 
                "Elipse"}, 5);
        miSeleccion = new SeleccionPanel("Colores", 
                new String[] {"Negro", "Rojo", "Azul", "Verde", "Gris"}, 5);
        
        AreaControl.add(misBotones);
        AreaControl.add(miSeleccion);
        
        miLienzo = new Lienzo(misBotones, miSeleccion);
        this.add(AreaControl, BorderLayout.WEST);
        this.add(miLienzo, BorderLayout.EAST);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              
        pack();
        this.setVisible(true);
    }  
    
    static public void main(String args[]) {
        MiPaint miPaint = new MiPaint();
    }
}
