package practicar;

import java.awt.Color;
import java.awt.Container;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;

public class PRACTICAR1 extends JFrame

{
    JPanel panelPrincipal = new JPanel();
    JPanel panelSecundario = new JPanel();
    JPanel panelTercero = new JPanel();
    JPanel panelCuarto = new JPanel();
    
    JLabel etiqueta = new JLabel("ETIQUETA ESPECIAL!!");
    
    JButton boton = new JButton("BOTÓN IMPORTANTE");
    
    JTextField campoTexto = new JTextField("Prueba");
    
    JFileChooser archivos = new JFileChooser();

    public PRACTICAR1(){
        Container contenedor = this.getContentPane();
        this.setBounds(100, 100, 500, 500);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
        
        contenedor.setLayout(new GridLayout(2,2));
        
        panelPrincipal.setBackground(Color.PINK);
        panelPrincipal.setVisible(true);
        panelSecundario.setBackground(Color.LIGHT_GRAY);
        panelSecundario.setVisible(true);
        panelTercero.setBackground(Color.RED);
        panelTercero.setVisible(true);
        panelCuarto.setBackground(Color.WHITE);
        panelCuarto.setVisible(true);
        
        contenedor.add(panelPrincipal);
        contenedor.add(panelSecundario);
        contenedor.add(panelTercero);
        contenedor.add(panelCuarto);
        
        panelPrincipal.add(campoTexto);
        panelSecundario.add(etiqueta);
        panelTercero.add(boton); 
        panelCuarto.add(archivos);
        
    }
    
    
    
    
    public static void main(String[] args) {
        new PRACTICAR1();
    }
}
