Credencial color

package Repaso;

 

import java.awt.Color;

import java.awt.Font;

 

import javax.swing.*;

 

@SuppressWarnings("serial")

public class Credencial_Color extends JFrame {

               

                Font f1 = new Font("Comic Sans MS", Font.BOLD, 12);

                Font f2 = new Font("Verdana", Font.BOLD, 12);

               

                private JLabel sep, sems, dgeti, cetis, nombreEscuela, nombreL, apellidosL, curpL, carreraL;

                private JTextField nombreT, apellidosT, curpT, carreraT;

               

                public Credencial_Color() {

                               setDefaultCloseOperation(EXIT_ON_CLOSE);

                               setSize(400,300);

                               setTitle("Ventana Credencial");

                              

                               getContentPane().setBackground(Color.black);

                              

                               sep = new JLabel();

                               sems = new JLabel();

                               dgeti = new JLabel();

                               cetis = new JLabel();

                               nombreEscuela = new JLabel();

                               nombreL = new JLabel();

                               apellidosL = new JLabel();

                               curpL = new JLabel();

                               carreraL = new JLabel();

                              

                               nombreT = new JTextField();

                               apellidosT = new JTextField();

                               curpT = new JTextField();

                               carreraT = new JTextField();

                              

                               sep.setForeground(Color.YELLOW);

                               sems.setForeground(Color.YELLOW);

                               dgeti.setForeground(Color.YELLOW);

                               cetis.setForeground(Color.YELLOW);

                               nombreEscuela.setForeground(Color.YELLOW);

                               nombreL.setForeground(Color.YELLOW);

                               apellidosL.setForeground(Color.YELLOW);

                               curpL.setForeground(Color.YELLOW);

                               carreraL.setForeground(Color.YELLOW);

                              

                               nombreT.setForeground(Color.white);

                               apellidosT.setForeground(Color.white);

                               curpT.setForeground(Color.white);

                               carreraT.setForeground(Color.white);

                              

                               nombreT.setBackground(Color.red);

                               apellidosT.setBackground(Color.red);

                               curpT.setBackground(Color.red);

                               carreraT.setBackground(Color.red);

                              

                               sep.setFont(f1);

                               sems.setFont(f1);

                               dgeti.setFont(f1);

                               cetis.setFont(f1);

                               nombreEscuela.setFont(f1);

                               nombreL.setFont(f1);

                               apellidosL.setFont(f1);

                               curpL.setFont(f1);

                               carreraL.setFont(f1);

                              

                               nombreT.setFont(f2);

                               apellidosT.setFont(f2);

                               curpT.setFont(f2);

                               carreraT.setFont(f2);

                              

                               sep.setText("SEP");

                               sems.setText("SEMS");

                               dgeti.setText("DGETI");

                               cetis.setText("CETIS 50");

                               nombreEscuela.setText("Mariano Matamoros Guridi");

                               nombreL.setText("Nombre:");

                               apellidosL.setText("Apellidos:");

                               curpL.setText("CURP:");

                               carreraL.setText("Carrera:");

                              

                               nombreT.setText("Dylan");

                               apellidosT.setText("Cueto Garduño");

                               curpT.setText("CUGD940225HDFTRY07");

                               carreraT.setText("Programación");

                              

                               getContentPane().setLayout(null);

                              

                               getContentPane().add(sep);

                               getContentPane().add(sems);

                               getContentPane().add(dgeti);

                               getContentPane().add(cetis);

                               getContentPane().add(nombreEscuela);

                              

                               getContentPane().add(nombreL);

                               getContentPane().add(apellidosL);

                               getContentPane().add(curpL);

                               getContentPane().add(carreraL);

                              

                               getContentPane().add(nombreT);

                               getContentPane().add(apellidosT);

                               getContentPane().add(curpT);

                               getContentPane().add(carreraT);

                              

                               sep.setBounds(20,20,250,20);

                               sems.setBounds(340,20,250,20);

                               dgeti.setBounds(340,150,250,20);

                               cetis.setBounds(20,60,250,20);

                               nombreEscuela.setBounds(100,60,250,20);

                              

                               nombreL.setBounds(20,100,250,20);

                               apellidosL.setBounds(20,140,250,20);

                               curpL.setBounds(20,180,250,20);

                               carreraL.setBounds(20,220,250,20);

                              

                               nombreT.setBounds(80,100,250,20);

                               apellidosT.setBounds(80,140,250,20);

                               curpT.setBounds(80,180,250,20);

                               carreraT.setBounds(80,220,250,20);

                              

                }

               

                public static void main(String[] args)      {

                               new Credencial_Color().setVisible(true);

                }

}