Drako01 /
java-coderhouse--53330
Repositorio con todas las Actividades repasadas en Clase a lo largo del Curso
Loading repository data…
CrissUD / repository
Clase 5 del curso de Interfaz Gráfica con Java, en donde se muestran conceptos relacionados con componentes gráficos, su implementacion y eventos por accion ActionListener.
Curso propuesto por el grupo de trabajo Semana de Ingenio y Diseño (SID) de la Universidad Distrital Francisco Jose de Caldas.
Cristian Felipe Patiño Cáceres - Estudiante de Ingeniería de Sistemas de la Universidad Distrital Francisco Jose de Caldas
En la sesión anterior se realizó la incorporación de nuevos servicios encargados proveer una lógica que ayudan a que el código este optimizado y exista un control con la creación de objetos compartidos.
En la clase VistaPrincipal ya se esta haciendo uso del servicio RecursosService, ahora se va a obtener el servicio ObjGraficosService ya que se va a utilizar en el futuro:
Declaración:
private ObjGraficosService sObjGraficos;
Obtención de Servicio:
sObjGraficos = ObjGraficosService.getService(); // dentro del constructor
Se va a crear un nuevo color en el servicio RecursosService este será el colorSecundario y se usará en varios componentes gráficos en el futuro.
Declaración
// Al inicio de la clase
private Color colorSecundario;
Ejemplificación
// Dentro del método crearColores
colorSecundario = new Color(151, 0, 158);
Método get
public Color getColorSecundario(){ return colorSecundario; }
La estructura de la aplicación puede observarse mediante un diagrama de clases y este hasta el momento se representa así:
El anterior modelo estructural muestra de forma general y aproximada como esta conformado el proyecto, ademas de resaltar que paquetes y dependencias existen hasta el momento.
Recordando un poco el recorrido se creo la clase LoginTemplate donde su código ya se modularizó y optimizó. La interfaz gráfica se ve asi:
También se tiene la clase VistaPrincipalTemplate que esta vacía y tiene un color de fondo así:
En esta sesión se van a abarcar 3 Temas principales cada uno con sus respectivos items, relacionados con componentes gráficos, eventos y preparación de una Single Page App:
Muchos proyectos normalmente necesitan bastantes interfaces gráficas para soportar todos los requerimientos, funcionalidades y datos que un cliente necesita en la aplicación. Se podría crear una ventana separada por cada vista que se quiere mostrar al cliente, sin embargo, las aplicaciones actuales se caracterizan por manejar toda su información, acciones y vistas a traves de una sola ventana. Esto se conoce como una aplicación Single-Page App.
Un ejemplo es la aplicación de escritorio de Spotify, puede notar que cuando se usa este programa en el computador este no esta abriendo una ventana nueva por cada botón que se oprime. La aplicación se encarga de gestionar qué elementos mostrar en la misma ventana y qué elementos ocultar dependiendo de la petición del usuario.
Si todo el código de la aplicación estuviera contenido en un solo archivo que representa la única ventana sería realmente desastroso, habría una cantidad inmensa de objetos gráficos en una sola clase, una cantidad de lineas de código incalculable y el entendimiento y mantenibilidad del código serían muy difícil.
Una buena forma de tener un código organizado, con una responsabilidad clara de cada parte del proyecto y una modularidad coherente es mediante la implementación de Componentes gráficos. De esta forma las aplicaciones estarán separadas adecuadamente y manteniendo una coherencia repartida que será mucho mas fácil de entender. Por ejemplo una posible separación por componentes para la aplicación de Spotify seria la siguiente:
De la anterior imágen se puede observar varias particularidades:
La componetización de una aplicación depende del programador, se podría ser demasiado riguroso y crear un componente gráfico por cada aspecto, o se podrían crear algunos grandes componentes gráficos que conformen toda la aplicación.
A continuación se verá como esta conformado un componente gráfico.
Un componente gráfico en Java se conforma principalmente de 2 clases:
Para crear el primer componente gráfico se crea la clase LoginComponent que estará ubicada dentro del paquete login:
A continuación se explican ciertas características de cada una de las clases que conforman un componente.
Nota: Aunque ya se ha trabajado con clases Template habrán nuevas características que serán necesarias e importantes.
Esta clase se encargara unicamente de mostrar en pantalla los diferentes objetos gráficos con las que el usuario interactuará, ademas mostrará los valores obtenidos de la lógica realizada por la clase Component.
Se caracteriza por:
Note que aunque en este ejemplo y hasta el momento se han creado clases Template que heredan de un JFrame también puede heredar de un JPanel por ejemplo.
Importa las librerías necesarias para crear objetos gráficos y mostrarlos en pantalla.
Recibe como parámetro en el constructor un objeto de la clase Component y la iguala a un objeto declarado de la misma referencia, esta técnica es llamada inyección de dependencia y se explica más adelante en esta lección.
public JButton getBCerrar(){ return this.bCerrar; }
public JButton getBEntrar(){ return this.bEntrar; }
public JButton getBRegistrarse(){ return this.bRegistrarse; }
public JButton getBOpcion1(){ return this.bOpcion1; }
public JTextField getTNombreUsuario(){ return this.tNombreUsuario; }
public JPasswordField getTClaveUsuario(){ return this.tClaveUsuario; }
public JComboBox<String> getCbTipoUsuario(){ return this.cbTipoUsuario; }
public JCheckBox getCheckSi(){ return this.checkSi; }
public JCheckBox getCheckNo(){ return this.checkNo; }
Esta clase se encarga de manejar toda la lógica que la clase Template podría necesitar, esta puede incluir manejo de eventos (cuando se oprime un botón con el mouse, cuando se oprime una tecla, cuando se pasa por un objeto gráfico etc.) manejo de servicios para traer información externa, manejo y validación de información etc.
Tiene ciertas Características como:
Selected from shared topics, language and repository description—not editorial ratings.
Drako01 /
Repositorio con todas las Actividades repasadas en Clase a lo largo del Curso
Drako01 /
Repositorio con todas las Actividades repasadas en Clase a lo largo del Curso
lfelipemarin /
Proyecto General Una importante Aerolínea que provee servicios a nivel global desea desarrollar un nuevo sistema integrado para la gestión de vuelos, reservas y socios. Dentro del alcance de dicho sistema se incluye: 1. Puntos de venta: Estos puntos de venta proveerán servicios de compra y reserva de pasajes, y gestión de socios. Existirán entre 5 y 20 oficinas de la Aerolínea en al menos 100 ciudades del mundo. 2. Servicios on-line: A partir de una aplicación Web se proveerán servicios de compra y reserva de pasajes. Es posible que se puedan hacer check – in a través del móvil del usuario. 3. Gestión en aeropuertos: En cada aeropuerto existirán entre 10 y 50 computadores ubicados en los puntos de check-in y en las puertas de embarque que serán utilizados por empleados de la aerolínea. 4. Gestión Operativa: Las mismas del punto anterior 5. Aplicación Movil. El usuario podrá hacer consulta de vuelos, reservas, pagos y check in por medio de su smatphone o Tablet. Cabe anotar que el check - in tendrá generado además un código QR para escaneo en los filtros del aeropuerto. 6. Sistema de PQRS( Peticiones, Quejas, Reclamos y Solicitudes). Este modulo será utilizado solo por el personal del Call Center de la aerolinea. Se atenderán los PQRS de los clientes, sobre aspectos como los cambios, cancelación o activación de reservas, incidencias con la venta de tiquetes o reservas, opiniones de los usuarios, solicitudes especiales (sillas de ruedas, oxigeno, asignación de asientos, asensos de clase, redención de millas, perdida de vuelos, entre otras). Cada PQRS será emitido con un código especial para posterior seguimiento por parte del cliente. 7. Seguridad: El módulo estará formado por: la definición y configuración de un certificado digital mediante SSL (Secure Socket Layer) y por medio del protocolo HTTPS que deberá instalarse en el servidor de aplicaciones; además, comprenderá la definición de políticas de acceso, autenticación y autorización de usuarios del sistema, los cuales estarán configurados por roles. También se deberá configurar el acceso por sesiones, las cuales estarán gestionadas por el servidor de aplicaciones. El sistema contendrá una pantalla de ingreso con login y password (Este deberá estar debidamente encriptado en la base de datos). Este módulo realizará la integración de los demás módulos del sistema garantizando que los roles de los usuarios se ajusten a las distintas opciones de cada menú o formulario. Se contempla la identificación y desarrollo de los casos de uso relacionados con la seguridad así como el análisis de requisitos y el diseño del modulo. Puntos de venta. Cada una de las oficinas contará con no más de 10 PCs para atender a clientes que desean reservar y adquirir pasajes. Adicionalmente se podrá dar de alta nuevos socios, modificar sus datos personales y consultar la cantidad de millas acumuladas. Los socios podrán tener 3 categorías. Categoría 1. Socio Elite Millas acumuladas por cada trayecto 1000 Total máximo de Equipaje a facturar 2 Maletas de 25 Kg cada una y una maleta de mano de 10 Kg Acceso a clase turista Categoría 2. Socio Gold Millas acumuladas por cada trayecto 2500 Total máximo de Equipaje a facturar 2 Maletas de 35 Kg cada una y una maleta de mano de 10 Kg Acceso a Clase Turista Categoría 3. Socio Silver Millas acumuladas por cada trayecto 5000 Total de Equipaje a facturar 4 Maletas de 35 Kg cada una y una maleta de mano de 10 Kg Acceso a Primera clase Se ha establecido que cada socio podrá redimir sus millas por otros trayectos si tienen un mínimo acumulado de 50000 millas se podrán ser utilizadas así: Redención Vuelos Nacionales: Temporada Baja 50000 millas por un trayecto. Temporada Alta 80000 Millas por un trayecto Redención Vuelos Internacionales: Temporada Baja 70000 millas por un trayecto (Destinos América). Temporada Alta 90000 Millas por un trayecto (Destinos América) Temporada Baja 90000 millas por un trayecto (Destinos Europa). Temporada Alta 140000 Millas por un trayecto (Destinos Europa) Las temporadas Bajas van de los meses de Marzo a Mayo y de Septiembre a Noviembre Las temporadas Altas van de los meses de Diciembre a Febrero y de Junio a Agosto. Cada uno de los PCs en los puntos de venta cuenta con procesadores Intel Pentium 4, con 512 Mb de memoria RAM y 100 Gb de disco y sistema operativo Windows XP o superior. Todos estos PCs están conectados en red y acceden al sistema central de reservas a partir de un enlace ADSL de 2 Mbits/seg. Se definen los siguientes requerimientos para los puntos de venta: 1. RF1. Alta de socios. 2. RF2. Modificación de datos personales de socios. 3. RF3. Reserva de vuelos (venta contado y crédito de pasajes) 4. RF4. Solicitud de Reserva de Sillas (Se debe tener en cuenta si es clase turista o ejecutiva). 4. RF5. Compra y canje de millas. 5. RF6. Reporte de millas para socios. 6. RF7. Redención de millas a socios 6. RNF1. Los agentes de viaje deberán identificarse en el sistema a partir de un usuario y contraseña. 7. RNF2. En caso de fallas de conexión con el sistema central, el sistema debe permitir operar normalmente, sincronizando posteriormente la información con el sistema central. 8. RNF3. El sistema se deberá comunicar con el sistema financiero autorizador de tarjetas de crédito para las ventas a crédito (Por ejemplo sistema de pago PSE o PayPal). En caso de que el mismo no se encuentre disponible, el sistema deberá solicitar la autorización manual. 9. RNF4. La información de las reservas de los vuelos deberá estar disponible a las otras sucursales y servicios on-line en un máximo de 30 minutos. 10. RNF5. La información de los socios deberá estar disponible a las otras sucursales y servicios on-line en un máximo de 4 horas. Servicios on-line. Se deberá proveer los siguientes servicios a los clientes mediante una aplicación web: 1. RF1. Consulta de vuelos (itinerarios, tarifas, disponibilidad de asientos, etc.) 2. RF2. Reserva y compra crédito de pasajes (compra pasaje con tarjeta crédito). 3. RF3. Compra y canje de millas (compra pasaje con millas). 4. RF4. Registro de socios. 5. RF5. Modificación datos socios. 6- RF6- Reserva de sillas en la cabina. (Tener en cuenta si es clase turista o ejecutiva) 7- RF7. Realización de check-in por el móvil del usuario (Requisito opcional). 8- RF8- Generación e impresión de pasabordo del usuario con código de barras de control. Los requerimientos funcionales RF3 y RF5 requieren que el usuario previamente se autentique en el sistema utilizando su identificador de socio y contraseña. Para estos requerimientos además, el sistema deberá enviar al socio un correo electrónico notificando el resultado de la transacción. Los aspectos de seguridad son vitales para lograr una buena imagen de la empresa y para que los socios puedan utilizar los servicios on-line frecuentemente sin riesgos. Adicionalmente, debido a la intensa competencia que presentan otras aerolíneas, es deseable que el sitio web sea sumamente eficiente y visualmente atractivo para los usuarios. Por eso mismo también es necesario lograr que los usuarios se familiaricen rápidamente con el sistema on-line y que el mismo esté disponible las 24 horas del día, los 7 días de la semana. Gestión en Aeropuertos Cada uno de los PCs ubicados en los puntos de check-in y en las puertas de embarque contaran con procesadores Pentium D de 3.0Ghz, con 2Gb de memoria RAM y 200Gb de disco y utilizaran un sistema operativo Linux. Todos estos PCs se comunican con el sistema central mediante una conexión de fibra óptica. Los funcionarios de la Aerolínea ubicados en los puestos de check-in y en las puertas de embarque utilizaran los siguientes servicios del sistema: 1. RF1. Consulta de reservas de pasajeros. 2. RF2. Check-in de equipaje de pasajeros 3. RF3. Consulta de estado y ubicación de equipaje. 4. RF4. Consulta de Pasajeros embarcados y confirmados. 5. RF5. Asignación de puerta de embarque y control de horarios de llegada y salida Adicionalmente, podrán realizar modificaciones de los vuelos de los pasajeros, modificaciones de itinerarios y horarios en casos de retrasos en los vuelos o retrasos de los pasajeros. Para evitar retrasos en los pasajeros y largas colas es crítico que esta funcionalidad se ejecute de forma eficiente y que el sistema se encuentre 100% disponible. Gestión Operativa En este modulo se deberá gestionar y planear las rutas de vuelos, horarios y frecuencias , tripulación, aviones, servicios de combustible y gastos operativos por uso de plataformas. RF1. Planeación de rutas y frecuencias horarias. RF2. Tripulación por cabina. Se definirá así: para vuelos nacionales 1 piloto, 1 copiloto, 3 azafatas o auxiliares de cabina. Para vuelos internacionales 1 piloto, 1 copiloto, 6 azafatas o auxiliares de cabina. RF3. Administración de aviones. La aerolínea para vuelos nacionales cuentan con 40 aviones Airbus A320-200 configurados de la siguiente forma. Cabina primera clase 10 pasajeros (4 sillas por fila). Cabina clase turista 170 pasajeros (6 sillas por cada fila). Para vuelos internacionales cuentan con 20 aviones Airbus A330-200 configurados de la siguiente forma. Cabina primera clase 30 pasajeros (6 sillas por fila). Cabina clase turista 220 pasajeros (8 sillas por cada fila). Por cada avión debe existir una bitácora de vuelo conformado por los siguientes datos. Código de Vuelo, Código de Plan de Vuelo, Ruta asignada (Origen- Destino), fecha y hora de salida. Fecha y hora de llegada. Escalas si existen, número de pasajeros embarcados, número de tripulantes, peso general de equipaje y carga, cantidad de combustible en libras, incidentes si existen. RF4. Operación. Se refiere al control de gastos operativos en aeropuerto e incluye Tanqueo general (Proveedor, cantidad de combustible en libras, precio por libra, precio total + impuesto). Costos sobre plataforma (cobro por hora en plataforma, impuesto aeroportuario). Otros requerimientos Esta planificado que dentro de los próximos 3 o 4 años, la Aerolínea se fusione con otra importante empresa del rubro. Sin embargo, debido a la inversión que representa el desarrollo de este sistema, se requiere que el mismo este vigente por al menos 9 años. Por este motivo, será necesario que el sistema soporte mecanismos que permitan modificar fundamentalmente su interfaz grafica y la lógica correspondiente a la gestión de socios y mecanismos de acumulación de millas. Restricciones Técnicas El sistema será implementado utilizando el lenguaje Java con las APIs de JEE ver 6 o 7. El IDE será Netbeans 7.3 o superior . El servidor de Aplicaciones será Glasfish ver 3 .1 o superior. El sistema deberá contar con por lo menos 5 capas definidas de la siguiente manera: 1. Capa Web: Deberá utilizarse el framework JSF 2.2 con PRIMEFACES. 2. Capa Seguridad: Estará compuesta por un componente de acceso por login y password utilizando roles y permisos de acceso. Esta capa incluye la autenticación, autorización e integración con todos los módulos del sistema. También deberá utilizarse certificados digitales. Se recomienda un sistema centralizado de control de usuarios por medio de directorios activos como LDAP, por lo que se utilizará el software OpenDS (Opensource). 3. Capa Lógica de Negocio: Estará compuesta por Session Beans. 4. Capa Persistencia: Estará compuesta por Entity Beans y utilizarà un framework de acceso a datos y ORM (Object Relational Mapping) como Hibernate o JPA. 5. Capa de Datos: Esta compuesta por las entidades y relaciones que integran la Base de Datos y que deberá estar gestionada por el DBMS.
profmatiasgarcia /
Ejemplo 5 del apunte de JAVA Clase 2
/* * 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 Formularios; import java.awt.Dimension; import java.awt.Toolkit; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import javax.swing.ImageIcon; import javax.swing.JOptionPane; public class IngresoDeClientes extends javax.swing.JFrame { Connection con; CallableStatement st; ResultSet r; public IngresoDeClientes() { initComponents(); this.inhabilitar(); //Inicio Del Codigo Para El Icono De Programa this.setTitle("Formulario Para El Ingreso De Clientes"); Dimension d=Toolkit.getDefaultToolkit().getScreenSize(); this.setSize((int) d.getWidth() , (int) d.getHeight()); setIconImage(new ImageIcon(getClass().getResource("/Imagenes/Iconocrediya.png")).getImage()); this.setLocationRelativeTo(null); this.setResizable(true); this.inhabilitar(); // Fin Del Codigo Para El Icono De Programa //Inicio Del Codigo Para La Conexion De Programa try{ Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); con=DriverManager.getConnection("jdbc:sqlserver://DIOSTEBENDIGA:1433;databaseName=BFCLIENTES","sa","123456"); JOptionPane.showMessageDialog(null,"Conexion De Base De Datos Exitosa"); }catch(Exception ex){JOptionPane.showMessageDialog(null, "Error De Conexion Con La Base De Datos", "Error De Comunicacion", JOptionPane.WARNING_MESSAGE);} //Fin Del Codigo Para La Conexion De Programa jdbc:sqlserver://DIOSTEBENDIGA:1433;databaseName=BFCLIENTES // jdbc:sqlserver://DIOSTEBENDIGA:1433;databaseName=BFCLIENTES } public class View_Principal extends javax.swing.JFrame { } public void inhabilitar(){ BTINuevoIngreso.setEnabled(true); BTIGuardar.setEnabled(false); BTIModificar.setEnabled(false); BTIConsultar.setEnabled(false); BTILimpiar.setEnabled(false); BTICancelar.setEnabled(false); BTIMenuPrincipal.setEnabled(true); //Caja De Texto JTICliente.setEnabled(false); JTIIdentificacion.setEnabled(false); JTIValor.setEnabled(false); JTICuota.setEnabled(false); JTIPago.setEnabled(false); JTIPorcentaje.setEnabled(false); JTIPago.setEnabled(false); JTIFechaDeInicio.setEnabled(false); JTIFechaFinal.setEnabled(false); JTITelefono.setEnabled(false); JTIObservaciones.setEnabled(false); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); JTITelefono = new javax.swing.JTextField(); JTIPorcentaje = new javax.swing.JTextField(); JTIValor = new javax.swing.JTextField(); JTIIdentificacion = new javax.swing.JTextField(); JTICliente = new javax.swing.JTextField(); JTIObservaciones = new javax.swing.JTextField(); JTIPago = new javax.swing.JComboBox<>(); JTICuota = new javax.swing.JTextField(); JTIFechaDeInicio = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); JTIFechaFinal = new javax.swing.JTextField(); jPanel4 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jPanel6 = new javax.swing.JPanel(); BTINuevoIngreso = new javax.swing.JButton(); BTIGuardar = new javax.swing.JButton(); BTIModificar = new javax.swing.JButton(); BTIConsultar = new javax.swing.JButton(); BTICancelar = new javax.swing.JButton(); BTISalir1 = new javax.swing.JButton(); BTIMenuPrincipal = new javax.swing.JButton(); BTILimpiar = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 204, 255), 2, true)); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 204, 255), 2, true), "Registro De Cliente", javax.swing.border.TitledBorder.RIGHT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Times New Roman", 3, 14))); // NOI18N jLabel2.setFont(new java.awt.Font("Times New Roman", 3, 14)); // NOI18N jLabel2.setText("Cliente"); jLabel3.setFont(new java.awt.Font("Times New Roman", 3, 14)); // NOI18N jLabel3.setText("Identificacion"); jLabel4.setFont(new java.awt.Font("Times New Roman", 3, 14)); // NOI18N jLabel4.setText("Valor Prestado"); jLabel5.setFont(new java.awt.Font("Times New Roman", 3, 14)); // NOI18N jLabel5.setText("Cuota"); jLabel6.setFont(new java.awt.Font("Times New Roman", 3, 14)); // NOI18N jLabel6.setText("Porcentaje"); jLabel7.setFont(new java.awt.Font("Times New Roman", 3, 14)); // NOI18N jLabel7.setText("Pago"); jLabel8.setFont(new java.awt.Font("Times New Roman", 3, 14)); // NOI18N jLabel8.setText("Fecha De Inicio"); jLabel9.setFont(new java.awt.Font("Times New Roman", 3, 14)); // NOI18N jLabel9.setText("Telefono"); jLabel10.setFont(new java.awt.Font("Times New Roman", 3, 14)); // NOI18N jLabel10.setText("Observaciones"); JTITelefono.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { JTITelefonoActionPerformed(evt); } }); JTIIdentificacion.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { JTIIdentificacionActionPerformed(evt); } }); JTIIdentificacion.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { JTIIdentificacionKeyTyped(evt); } }); JTICliente.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { JTIClienteActionPerformed(evt); } }); JTIPago.setFont(new java.awt.Font("Times New Roman", 2, 14)); // NOI18N JTIPago.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Diario", "Semanal", "Quincenal", "Mensual" })); JTIPago.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); jLabel11.setFont(new java.awt.Font("Times New Roman", 3, 14)); // NOI18N jLabel11.setText("Fecha Final"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addGap(18, 18, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(JTICliente, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE) .addComponent(JTIIdentificacion, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE))) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4) .addComponent(jLabel5)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(JTIValor, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE) .addComponent(JTICuota))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel6) .addComponent(jLabel7) .addComponent(jLabel8)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(JTIFechaDeInicio) .addComponent(JTIPorcentaje, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE) .addComponent(JTIPago, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel11) .addGap(54, 54, 54) .addComponent(JTIFechaFinal)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel9) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(JTITelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel10) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE) .addComponent(JTIObservaciones, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(JTICliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(JTIIdentificacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(JTIValor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(JTICuota, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(JTIPorcentaje, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(JTIPago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel8) .addComponent(JTIFechaDeInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel11) .addComponent(JTIFechaFinal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel9) .addComponent(JTITelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel10) .addComponent(JTIObservaciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 204, 255), 2, true), "Personal Registrado", javax.swing.border.TitledBorder.RIGHT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Times New Roman", 3, 14))); // NOI18N jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null}, {null, null, null, null, null, null, null, null, null} }, new String [] { "Cliente", "Identificacion", "Valor Prestado", "Cuota", "Porcentaje", "Pago", "Fecha", "Telefono", "Observaciones" } )); jScrollPane1.setViewportView(jTable1); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1) .addContainerGap()) ); jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addContainerGap()) ); jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 204, 255), 2, true), "Botones De Accion", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Times New Roman", 3, 14))); // NOI18N BTINuevoIngreso.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N BTINuevoIngreso.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Nuevo.png"))); // NOI18N BTINuevoIngreso.setText("Nuevo"); BTINuevoIngreso.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); BTINuevoIngreso.setFocusable(false); BTINuevoIngreso.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); BTINuevoIngreso.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); BTINuevoIngreso.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); BTINuevoIngreso.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BTINuevoIngresoActionPerformed(evt); } }); BTIGuardar.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N BTIGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Ingresar.png"))); // NOI18N BTIGuardar.setText("Ingresar"); BTIGuardar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); BTIGuardar.setFocusable(false); BTIGuardar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); BTIGuardar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); BTIGuardar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); BTIGuardar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BTIGuardarActionPerformed(evt); } }); BTIModificar.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N BTIModificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Modificar.png"))); // NOI18N BTIModificar.setText("Modificar"); BTIModificar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); BTIModificar.setFocusable(false); BTIModificar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); BTIModificar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); BTIModificar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); BTIConsultar.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N BTIConsultar.setIcon(new javax.swing.ImageIcon("D:\\Software De Programacion\\Iconos\\Botones\\Buscar.png")); // NOI18N BTIConsultar.setText("Consultar"); BTIConsultar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); BTIConsultar.setFocusable(false); BTIConsultar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); BTIConsultar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); BTIConsultar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); BTIConsultar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BTIConsultarActionPerformed(evt); } }); BTICancelar.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N BTICancelar.setIcon(new javax.swing.ImageIcon("D:\\Software De Programacion\\Iconos\\Botones\\Cancelar.png")); // NOI18N BTICancelar.setText("Cancelar"); BTICancelar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); BTICancelar.setFocusable(false); BTICancelar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); BTICancelar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); BTICancelar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); BTICancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BTICancelarActionPerformed(evt); } }); BTISalir1.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N BTISalir1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BSalir.png"))); // NOI18N BTISalir1.setText("Salir"); BTISalir1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); BTISalir1.setFocusable(false); BTISalir1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); BTISalir1.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); BTISalir1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); BTISalir1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BTISalir1ActionPerformed(evt); } }); BTIMenuPrincipal.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N BTIMenuPrincipal.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BMenuPrincipal.png"))); // NOI18N BTIMenuPrincipal.setText("Menu"); BTIMenuPrincipal.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); BTIMenuPrincipal.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); BTIMenuPrincipal.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); BTIMenuPrincipal.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); BTIMenuPrincipal.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BTIMenuPrincipalActionPerformed(evt); } }); BTILimpiar.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N BTILimpiar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Limpiar.png"))); // NOI18N BTILimpiar.setText("Limpiar"); BTILimpiar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); BTILimpiar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); BTILimpiar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); BTILimpiar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BTILimpiarActionPerformed(evt); } }); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addGap(14, 14, 14) .addComponent(BTINuevoIngreso, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(BTIGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(BTIModificar, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(BTIConsultar, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE) .addComponent(BTILimpiar, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(BTICancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(BTIMenuPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(BTISalir1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel6Layout.setVerticalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(BTISalir1) .addComponent(BTIMenuPrincipal) .addComponent(BTICancelar) .addComponent(BTILimpiar) .addComponent(BTIConsultar) .addComponent(BTIModificar) .addComponent(BTIGuardar) .addComponent(BTINuevoIngreso)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jLabel1.setFont(new java.awt.Font("Times New Roman", 3, 24)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Formulario Para El Ingreso De Nuevos Clientes - CREDIYA"); jLabel1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 204, 255), 2, true), "Sistema De Prestamos CREDIYA", javax.swing.border.TitledBorder.RIGHT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Times New Roman", 3, 14), new java.awt.Color(0, 204, 255))); // NOI18N jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(4, 4, 4) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// </editor-fold> private void JTITelefonoActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void JTIIdentificacionActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void JTIClienteActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void BTINuevoIngresoActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: BTINuevoIngreso.setEnabled(true); BTIGuardar.setEnabled(true); BTIModificar.setEnabled(true); BTIConsultar.setEnabled(true); BTILimpiar.setEnabled(true); BTICancelar.setEnabled(true); BTIMenuPrincipal.setEnabled(true); //Caja De Texto JTICliente.setEnabled(true); JTIIdentificacion.setEnabled(true); JTIValor.setEnabled(true); JTICuota.setEnabled(true); JTIPorcentaje.setEnabled(true); JTIPago.setEnabled(true); JTIFechaDeInicio.setEnabled(true); JTIFechaFinal.setEnabled(true); JTITelefono.setEnabled(true); JTIObservaciones.setEnabled(true); } private void BTISalir1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: if (JOptionPane.showConfirmDialog(rootPane, "¿Desea Salir Del Sistema?", "Salida Del Sistema", JOptionPane.YES_NO_CANCEL_OPTION) == JOptionPane.YES_OPTION) System.exit(0); } private void BTIConsultarActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: ConsultaDeClientes obj=new ConsultaDeClientes(); obj.setVisible(true); JOptionPane.showMessageDialog(null, "Formulario Para La Consulta De Clientes"); } private void BTIGuardarActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: String Nom=this.JTICliente.getText(); int Ident=Integer.parseInt(this.JTIIdentificacion.getText()); int Val=Integer.parseInt(this.JTIValor.getText()); int Cuo=Integer.parseInt(this.JTIPago.getActionCommand()); int Porc=Integer.parseInt(this.JTIPorcentaje.getText()); String Pag=this.JTIPago.getActionCommand(); String FecI=this.JTIFechaDeInicio.getText();//JTIFechaDeInicio String FecF=this.JTIFechaFinal.getText();//JTIFechaFinal String Tel=this.JTITelefono.getText(); String Obs=this.JTIObservaciones.getText(); if (JTICliente.getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Por Favor Ingrese El Nombre Del Cliente","Error",JOptionPane.ERROR_MESSAGE); } else if (JTIIdentificacion.getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Por Favor Ingrese Numero De Identificacion","Error",JOptionPane.ERROR_MESSAGE); } else if (JTIValor.getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Por Favor Ingrese Valor Del Prestamo","Error",JOptionPane.ERROR_MESSAGE); } else if (JTIPago.getActionCommand().isEmpty()) { JOptionPane.showMessageDialog(null, "Por Favor Ingrese El Numero De Cuotas","Error",JOptionPane.ERROR_MESSAGE); } else if (JTIPorcentaje.getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Por Favor Ingrese El Valor Del Porcentaje","Error",JOptionPane.ERROR_MESSAGE); } else if (JTIPago.getActionCommand().isEmpty()) { JOptionPane.showMessageDialog(null, "Por Favor Ingrese El Tipo De Pago","Error",JOptionPane.ERROR_MESSAGE); } else if (JTIFechaDeInicio.getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Por Favor Ingrese La Fecha Inicial Del Prestamo ","Error",JOptionPane.ERROR_MESSAGE); } else if (JTIFechaFinal.getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Por Favor Ingrese La Fecha Final Del Prestamo ","Error",JOptionPane.ERROR_MESSAGE); } else if (JTITelefono.getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Por Favor Ingrese Un Numero Telefonico O Celular","Error",JOptionPane.ERROR_MESSAGE); } else if (JTIObservaciones.getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Por Favor Ingrese Una Observacion","Error",JOptionPane.ERROR_MESSAGE); } else { try{ st=con.prepareCall("{call Guardar (?,?,?,?,?,?,?,?,??)}"); st.setString(1, Nom); st.setInt(2, Ident); st.setInt(3, Val); st.setInt(4, Cuo); st.setInt(5, Porc); st.setString(6, Pag); st.setString(7, FecI); st.setString(8, FecF); st.setString(9, Tel); st.setString(10, Obs); int rta=st.executeUpdate(); if(rta==1) { JOptionPane.showMessageDialog(null, "Datos Ingresados Correctamente"); } //este es el error que sale osea que no esta mandando para la base de datos //y en caso como me lo estas describiendome tiene que salir el mensaje este y me sale es el de }catch (Exception ex){JOptionPane.showMessageDialog(null, "No Se Guardo Correctamente", "Error De Comunicacion", JOptionPane.WARNING_MESSAGE);} } } private void BTIMenuPrincipalActionPerformed(java.awt.event.ActionEvent evt) { Menu obj=new Menu(); obj.setVisible(true); JOptionPane.showMessageDialog(null, "Menu Principal CREDIYA"); } private void BTICancelarActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: //Codigo De Limpieza JTICliente.setText(""); JTIIdentificacion.setText(""); JTIValor.setText(""); JTICuota.setActionCommand(""); JTIPorcentaje.setText(""); JTIPago.setActionCommand(""); JTIFechaDeInicio.setText(""); JTIFechaFinal.setText(""); JTITelefono.setText(""); JTIObservaciones.setText(""); //Fin //Codigo Para Cancelar BTINuevoIngreso.setEnabled(true); BTIGuardar.setEnabled(false); BTIModificar.setEnabled(false); BTIConsultar.setEnabled(false); BTILimpiar.setEnabled(false); BTICancelar.setEnabled(true); BTIMenuPrincipal.setEnabled(true); //Cajas de texto JTICliente.setEnabled(false); JTIIdentificacion.setEnabled(false); JTIValor.setEnabled(false); JTICuota.setEnabled(false); JTIPorcentaje.setEnabled(false); JTIPago.setEnabled(false); JTIFechaDeInicio.setEnabled(false); JTIFechaFinal.setEnabled(false); JTITelefono.setEnabled(false); JTIObservaciones.setEnabled(false); } private void BTILimpiarActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: JTICliente.setText(""); JTIIdentificacion.setText(""); JTIValor.setText(""); JTICuota.setActionCommand(""); JTIPorcentaje.setText(""); JTIPago.setActionCommand(""); JTIFechaDeInicio.setText(""); JTIFechaFinal.setText(""); JTITelefono.setText(""); JTIObservaciones.setText(""); } //metodo que al cerrar la ventana ejecuta el codigo contenido //en el cuerpo private void formWindowClosing(java.awt.event.WindowEvent evt) { // TODO add your handling code here: //permite asignar un nuevo valor a la variable de control directamente //sin necesidad de instanciar un objeto de la clase Menu } private void JTIIdentificacionKeyTyped(java.awt.event.KeyEvent evt) { // TODO add your handling code here: } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(IngresoDeClientes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(IngresoDeClientes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(IngresoDeClientes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(IngresoDeClientes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new IngresoDeClientes().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton BTICancelar; private javax.swing.JButton BTIConsultar; private javax.swing.JButton BTIGuardar; private javax.swing.JButton BTILimpiar; private javax.swing.JButton BTIMenuPrincipal; private javax.swing.JButton BTIModificar; private javax.swing.JButton BTINuevoIngreso; private javax.swing.JButton BTISalir1; private javax.swing.JTextField JTICliente; private javax.swing.JTextField JTICuota; private javax.swing.JTextField JTIFechaDeInicio; private javax.swing.JTextField JTIFechaFinal; private javax.swing.JTextField JTIIdentificacion; private javax.swing.JTextField JTIObservaciones; private javax.swing.JComboBox<String> JTIPago; private javax.swing.JTextField JTIPorcentaje; private javax.swing.JTextField JTITelefono; private javax.swing.JTextField JTIValor; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel4; private javax.swing.JPanel jPanel6; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable jTable1; // End of variables declaration private static class DatosDeIngreso { private void setCliente(String text) { } private void setObservaciones(String text) { } private void Almacenar() { } private void setFecha(String Fecha) { } private void setPago(String text) { } } }
profeInformatica101 /
Este repositorio contiene un proyecto base en Java desarrollado con Maven, que incluye la clase abstracta FiguraGeometrica como punto de partida para implementar diferentes figuras geométricas. Además, está configurado con JUnit 5 para facilitar la creación de pruebas unitarias y garantizar la calidad del código.