package Capitulo_6.Dibujo;

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

public class PruebaTodo extends JFrame {
    private Botones misBotones;
    private SeleccionPanel miSeleccion;
    private Lienzo miLienzo;
    
    public PruebaTodo () {
        JPanel AreaControl = new JPanel(new GridLayout(2, 1));
        misBotones = new Botones("Botones", new String[] {"uno", "dos", "tres", "cuatro"}, 4);
        miSeleccion = new SeleccionPanel("Algo", new String[] {"a", "b", "c", "d", "e"}, 5);
        
        AreaControl.add(misBotones);
        AreaControl.add(miSeleccion);
        
        miLienzo = new Lienzo();
        this.add(AreaControl, BorderLayout.WEST);    
        this.add(miLienzo,BorderLayout.EAST);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
        pack();
        setVisible(true);
    }
    
    static public void main(String args[]) {
        new PruebaTodo();
    }
}
