Вы находитесь на странице: 1из 53

ESCUELA PROFESIONAL DE INGENIERIA

FACULTAD DE INGENIERIA DE SISTEMAS

CURSO:
PROGRAMACIÒN VISUAL

TEMA:
PROYECTO FINAL – GIGGA

DOCENTE:
EDY JAVIER GARCIA CORDOVA

ALUMNO:
VELASQUEZ ERAZO YUSILIN SHAMPIER
QUINO SANDOVALL VICTOR ALFONSO
LEON RAMIREZ THANIA ZARITH
ANCAJIMA RONDOY ABEL
PARRILLA ACHA WILTON ALFREDO
FALERO GARCIA KARLY ALELY

CICLO
III

PIURA – PERÙ
EMPRESA GIGGA
GIGGA, Empresa en el ámbito de la tecnología y el mundo virtual. Requiere un sistema en donde
se manejen sus gestiones en ventas/servicios de Gigga, ventas de periféricos, computadoras,
Servidores, desarrollo de sistemas y App, Diseño gráfico, desarrollo web y Cursos particulares de
Gigga.
Cuyo objetivo, que el usuario encargado de manejar de este sistema tenga al tanto toda la
información necesaria para generar una consulta o venta de algún servicio Gigga al cliente.
El sistema ante todo debe dar a conocer su identidad, teniendo como entrada un INICIO, donde
muestre información de ¿Quiénes somos?, el Equipo Gigga y sus Términos y Condiciones.
Dándole paso a un registro sea la gestión que se dé, debe de llenarse este formulario y quedar
registrado. A continuación, podemos realizar las gestiones que se requieren: SERVICIOS,
PRODUCTOS Y EDUCACION.
❑ En SERVICIOS contamos con cuatros diversos servicios a realizar:

• “Desarrollo Web”: En este servicio contamos con tres tipos de gestiones según lo
que requiera el cliente. Contamos con desarrollo de páginas web(S/.500),
Block(S/.250) y Plataformas(S/.1300). Teniendo dos tipos de formas de pago
“Contado” y “Crédito”.
Si es al “Contado” se hace un descuento al precio del 10% a la pagina web, un 8% a
los Block y un 15% al desarrollo de Plataformas.
Si es al “Crédito” se indica la cantidad de cuotas en las que quiere pagar y se hace
un incremento al precio del 5% a la pagina web, un 3% a los Block y un 10% al
desarrollo de plataformas.

• “Diseño Gráfico”: En este servicio contamos con tres tipos de gestiones según lo
que requiera el cliente. Contamos con diseño de Publicidades(S/.400), Isotipos-
Marcas(S/.600) y Proyectos(S/.1000). Teniendo dos tipos de formas de pago
“Contado” y “Crédito”.
Si es al “Contado” se hace un descuento al precio del 10% a la Publicidad, un 8% a
los Isotipos-Marcas y un 15% a los Proyectos.
Si es al “Crédito” se indica la cantidad de cuotas en las que quiere pagar y se hace
un incremento al precio del 5% a la Publicidad, un 3% a los Isotipos-Marcas y un
10% a los Proyectos.

• “Desarrollo de Sistema/Programación”: En este servicio contamos con un listado de


servicios en creación de sistemas y aplicaciones móviles, por ejemplo, en lo que es:
Sistemas de Ventas, Sistemas se Seguridad, Software Libres, Software Licenciados,
App iOS, App Android, etc. Con sus respetivos costos, Teniendo dos tipos de formas
de pago “Contado” y “Crédito”.
Si es al “Contado” se hace un descuento al precio del 10% del total de los servicios
seleccionados. Si es al crédito tendrá un incremento del 15% del total de los servicios
seleccionados e indicaremos la cantidad de cuotas en la que quiere pagar.

• “Servicio técnico”: En este servicio, recibimos el problema o queja que tenga el


cliente de su dispositivo ya sea de su laptop, computadora u otro dispositivo. Siendo
documentado para después citarle un técnico especialista a domicilio dándole fecha
de visita y el precio a pagar según el tipo de ayuda que requiere, si es el caso, Si no
ahí mismo se dará el servicio, dándole una fecha de entrega para que vengan a
recoger dicho dispositivo dañado. Hay dos formas de pago, si es a domicilio, se hace
un cobro adicional de 20 soles + el precio si es al contado, si es al crédito se hace un
cobro adicional de 50 soles + el precio.
Si es la Central de Gigga, se hace un descuento de 50 soles al precio si es al contado,
Y si es al crédito un incremento adicional de 10 soles al precio.

❑ En PRODUCTOS contamos con tres tipos de ventas: “Periféricos, Computadoras y


Servidores”

• “Periféricos”: Gigga aparte de brindar servicios en el ámbito de software y sistemas,


también produce hardware, periféricos mejorados, eficaces y sencillos de usar,
Mantenemos un listado de diversos periféricos, ya sea de Mouse, Teclados,
Monitores, Parlantes, Impresoras, Cámaras Web entre otros.
Tenemos dos formas de pagos: Contado y Crédito.
Si es al contado se hace un descuento del 8% si el precio total es menos de 3000
soles, caso contrario el descuento es del 12% al precio total.
Si es al Crédito se hace un incremento del 6%% si el precio es mayor de 5000 soles,
caso contrario se hace un incremento del 3%.

• “Computadoras”: Estos productos son de Computadoras y laptop modernas,


teniendo un uso sencillo y de la última generación del mercado. Contamos con
distintas marcas y modelos, y diversos precios.
Tenemos dos formas de pagos: Contado y Crédito.
Si es al contado se hace un descuento del 15% si el precio total es menos de 20000
soles, caso contrario el descuento es del 20% al precio total.
Si es al Crédito se hace un incremento del 10%% si el precio es mayor de 15000
soles, caso contrario se hace un incremento del 5%.

• “Servidores”: En este servicio, brindamos diversos tipos de servidores de alta


calidad, de diversas marcas y capacidades, contamos con un listado de distintos
servidores y precios. Tenemos dos formas de pagos: Contado y Crédito.
Si es al contado se hace un descuento del 10% si el precio total es menos de 5000
soles, caso contrario el descuento es del 15% al precio total.
Si es al Crédito se hace un incremento del 8%% si el precio es mayor de 8000 soles,
caso contrario se hace un incremento del 4%.

❑ En EDUCACION, contamos con diversos cursos particulares de Gigga,

• “Cursos”: Contamos con diversos cursos ya sea en los temas de programación,


desarrollo web, Diseño gráfico, Redes entre otros.
Cada curso tiene sus Clases completas, teniendo un costo especifico
Contamos con dos formas de pagos: Contado Y crédito.
Si es al Contado se hace un descuento del 10% al precio total si se haya escogido en
total menos de 5 cursos.
Si es al Crédito se indica la cantidad de cuotas a pagar, y se da un incremento al
precio total si se haya escogido más de 5 cursos.
EJECUCION DEL PROYECTO FINAL GIGGA
1. Presentación de todos los formularios del proyecto
2. A continuación, mostrare el avance del código de mis formularios

package ProyectoFinal;

import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

/**
*
* @author YUSELIN
*/
public class GESTIONES extends javax.swing.JFrame {
/**
* Creates new form GESTIONES
*/
DefaultTableModel RG = new DefaultTableModel();
public GESTIONES() {
initComponents();
String titulos []={"NOMBRES", "APELLIDOS", "DNI","Nª
TELEFONICO","DIRECCION","DIA DE REGISTRO"};
RG.setColumnIdentifiers(titulos);
Tabla.setModel(RG);
setSize(556, 498);
setVisible(true);
}

/**
* 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();


jDesktopPane2 = new javax.swing.JDesktopPane();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
txtNombres = new javax.swing.JTextField();
txtApellidos = new javax.swing.JTextField();
txtDni = new javax.swing.JTextField();
txtTelefono = new javax.swing.JTextField();
txtDireccion = new javax.swing.JTextField();
btnNuevo = new javax.swing.JButton();
btnAgregar = new javax.swing.JButton();
btnEliminar = new javax.swing.JButton();
btnCerrar = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
Tabla = new javax.swing.JTable();
jLabel6 = new javax.swing.JLabel();
txtDia = new javax.swing.JTextField();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenu2 = new javax.swing.JMenu();
jMenuItem2 = new javax.swing.JMenuItem();
jMenuItem3 = new javax.swing.JMenuItem();
jMenuItem4 = new javax.swing.JMenuItem();
jMenuItem5 = new javax.swing.JMenuItem();
jMenu3 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenuItem7 = new javax.swing.JMenuItem();
jMenuItem9 = new javax.swing.JMenuItem();
jMenu4 = new javax.swing.JMenu();
jMenuItem8 = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jDesktopPane2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setForeground(new java.awt.Color(255, 255, 255));
jLabel1.setText("Nombres:");
jDesktopPane2.add(jLabel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(39, 12, -1, -1));

jLabel2.setForeground(new java.awt.Color(255, 255, 255));


jLabel2.setText("Apellidos:");
jDesktopPane2.add(jLabel2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(40, 40, -1, -1));

jLabel3.setForeground(new java.awt.Color(255, 255, 255));


jLabel3.setText("DNI:");
jDesktopPane2.add(jLabel3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(40, 70, -1, -1));

jLabel4.setForeground(new java.awt.Color(255, 255, 255));


jLabel4.setText("Nª Telefonico:");
jDesktopPane2.add(jLabel4, new
org.netbeans.lib.awtextra.AbsoluteConstraints(40, 100, -1, -1));

jLabel5.setForeground(new java.awt.Color(255, 255, 255));


jLabel5.setText("Direccion:");
jDesktopPane2.add(jLabel5, new
org.netbeans.lib.awtextra.AbsoluteConstraints(40, 130, -1, -1));
jDesktopPane2.add(txtNombres, new
org.netbeans.lib.awtextra.AbsoluteConstraints(140, 10, 230, -1));
jDesktopPane2.add(txtApellidos, new
org.netbeans.lib.awtextra.AbsoluteConstraints(140, 40, 230, -1));
jDesktopPane2.add(txtDni, new
org.netbeans.lib.awtextra.AbsoluteConstraints(140, 70, 120, -1));
jDesktopPane2.add(txtTelefono, new
org.netbeans.lib.awtextra.AbsoluteConstraints(140, 100, 120, -1));
jDesktopPane2.add(txtDireccion, new
org.netbeans.lib.awtextra.AbsoluteConstraints(140, 130, 230, -1));

btnNuevo.setText("NUEVO");
btnNuevo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnNuevoActionPerformed(evt);
}
});
jDesktopPane2.add(btnNuevo, new
org.netbeans.lib.awtextra.AbsoluteConstraints(60, 220, -1, -1));

btnAgregar.setText("AGREGAR");
btnAgregar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAgregarActionPerformed(evt);
}
});
jDesktopPane2.add(btnAgregar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(150, 220, -1, -1));

btnEliminar.setText("ELIMINAR");
btnEliminar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnEliminarActionPerformed(evt);
}
});
jDesktopPane2.add(btnEliminar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(250, 220, -1, -1));

btnCerrar.setText("CERRAR");
btnCerrar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCerrarActionPerformed(evt);
}
});
jDesktopPane2.add(btnCerrar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(340, 220, -1, -1));

Tabla.setForeground(new java.awt.Color(0, 153, 153));


Tabla.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane1.setViewportView(Tabla);

jDesktopPane2.add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(20, 270, 510, 120));

jLabel6.setForeground(new java.awt.Color(255, 255, 255));


jLabel6.setText("Dìa de Registro:");
jDesktopPane2.add(jLabel6, new
org.netbeans.lib.awtextra.AbsoluteConstraints(40, 160, -1, -1));
jDesktopPane2.add(txtDia, new
org.netbeans.lib.awtextra.AbsoluteConstraints(140, 160, 230, -1));

javax.swing.GroupLayout jPanel1Layout = new


javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jDesktopPane2,
javax.swing.GroupLayout.PREFERRED_SIZE, 556,
javax.swing.GroupLayout.PREFERRED_SIZE)
);
jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jDesktopPane2,
javax.swing.GroupLayout.PREFERRED_SIZE, 498,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);

getContentPane().add(jPanel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 550, 460));

jMenu1.setText("REGISTRO");
jMenuBar1.add(jMenu1);

jMenu2.setText("SERVICIOS");

jMenuItem2.setText("Desarrollo Web");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem2);

jMenuItem3.setText("Diseño Grafico");
jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem3ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem3);

jMenuItem4.setText("Desarrollo de Sistema/Programas");
jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem4ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem4);

jMenuItem5.setText("Servicio Tecnico");
jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem5ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem5);

jMenuBar1.add(jMenu2);

jMenu3.setText("PRODUCTOS");

jMenuItem1.setText("Perifericos");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
}
});
jMenu3.add(jMenuItem1);

jMenuItem7.setText("Computadoras");
jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem7ActionPerformed(evt);
}
});
jMenu3.add(jMenuItem7);

jMenuItem9.setText("Servidores");
jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem9ActionPerformed(evt);
}
});
jMenu3.add(jMenuItem9);

jMenuBar1.add(jMenu3);

jMenu4.setText("EDUCACION");

jMenuItem8.setText("Cursos Gigga");
jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem8ActionPerformed(evt);
}
});
jMenu4.add(jMenuItem8);

jMenuBar1.add(jMenu4);

setJMenuBar(jMenuBar1);

pack();
}// </editor-fold>

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new frmDesarrolloWeb().setVisible(true);
}

private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new INICIIO_Bienvenida().setVisible(true);
}

private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new frmDiseñoGrafico().setVisible(true);
}

private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new frmDESARROLLO_SISTEMAS().setVisible(true);
}

private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new frmServicioTecnico().setVisible(true);
}

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new frmPerifericos().setVisible(true);
}

private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new frmComputadoras().setVisible(true);
}

private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new frmSERVIDORES().setVisible(true);
}

private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new frmEDUCACION().setVisible(true);
}

private void btnAgregarActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
String Datos[] = new String [6];
String nombre, apellidos;
int DNI,telefono;
String registro;
String direccion;
double año=.2018;
boolean verifica;
nombre=(String)(txtNombres.getText());
apellidos=(String)(txtApellidos.getText());
DNI=Integer.parseInt(txtDni.getText());
telefono=Integer.parseInt(txtTelefono.getText());
direccion=(String)(txtDireccion.getText());
registro=(String)(txtDia.getText())+ año;
verifica=txtNombres.getText().equals("") || txtApellidos.getText().equals("") ||
txtDni.getText().equals("") ;
verifica= verifica || txtTelefono.getText().equals("") ||
txtDireccion.getText().equals("") || txtDia.getText().equals("") ;
if (!verifica){

Datos[0]=txtNombres.getText();
Datos[1]=txtApellidos.getText();
Datos[2]=txtDni.getText();
Datos[3]=txtTelefono.getText();
Datos[4]=txtDireccion.getText();
Datos[5]=txtDia.getText()+año;

RG.addRow(Datos);
txtNombres.setText("");
txtApellidos.setText("");
txtDni.setText("");
txtTelefono.setText("");
txtDireccion.setText("");
txtDia.setText("");

private void btnEliminarActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
int fila, total;
fila=Tabla.getSelectedRow();
if (fila>=0)
RG.removeRow(fila);
else
JOptionPane.showMessageDialog(null,"Seleccione una fila de la tabla para
eliminar");
}

private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
txtNombres.setText("");
txtApellidos.setText("");
txtDni.setText("");
txtTelefono.setText("");
txtDireccion.setText("");
txtDia.setText("");
txtNombres.requestFocus();
}

/**
* @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(GESTIONES.class.getName()).log(java.util.logging
.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(GESTIONES.class.getName()).log(java.util.logging
.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(GESTIONES.class.getName()).log(java.util.logging
.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(GESTIONES.class.getName()).log(java.util.logging
.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new GESTIONES().setVisible(true);
}
});
}

// Variables declaration - do not modify


private javax.swing.JTable Tabla;
private javax.swing.JButton btnAgregar;
private javax.swing.JButton btnCerrar;
private javax.swing.JButton btnEliminar;
private javax.swing.JButton btnNuevo;
private javax.swing.JDesktopPane jDesktopPane2;
private javax.swing.JLabel jLabel1;
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.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenu jMenu3;
private javax.swing.JMenu jMenu4;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuItem jMenuItem2;
private javax.swing.JMenuItem jMenuItem3;
private javax.swing.JMenuItem jMenuItem4;
private javax.swing.JMenuItem jMenuItem5;
private javax.swing.JMenuItem jMenuItem7;
private javax.swing.JMenuItem jMenuItem8;
private javax.swing.JMenuItem jMenuItem9;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextField txtApellidos;
private javax.swing.JTextField txtDia;
private javax.swing.JTextField txtDireccion;
private javax.swing.JTextField txtDni;
private javax.swing.JTextField txtNombres;
private javax.swing.JTextField txtTelefono;
// End of variables declaration
}
package ProyectoFinal;

/**
*
* @author YUSELIN
*/
public class frmDesarrolloWeb extends javax.swing.JFrame {

/**
* Creates new form frmDesarrolloWeb
*/
public frmDesarrolloWeb() {
initComponents();
setSize(478, 478);
setVisible(true);

/**
* 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() {

buttonGroup1 = new javax.swing.ButtonGroup();


jDesktopPane1 = new javax.swing.JDesktopPane();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
rbPaginaWeb = new javax.swing.JRadioButton();
rbBlock = new javax.swing.JRadioButton();
rbPlataforma = new javax.swing.JRadioButton();
jLabel3 = new javax.swing.JLabel();
cboAmbito = new javax.swing.JComboBox<>();
jPanel1 = new javax.swing.JPanel();
chkContado = new javax.swing.JCheckBox();
chkCredito = new javax.swing.JCheckBox();
jLabel4 = new javax.swing.JLabel();
txtCuotas = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
txtDescuento = new javax.swing.JTextField();
txtPrecio = new javax.swing.JTextField();
txtPrecioCuotas = new javax.swing.JTextField();
txtTotalPagar = new javax.swing.JTextField();
btnNuevo = new javax.swing.JButton();
btnCalcular = new javax.swing.JButton();
btnCerrar = new javax.swing.JButton();
jLabel9 = new javax.swing.JLabel();
txtIncremento = new javax.swing.JTextField();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jDesktopPane1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N


jLabel1.setForeground(new java.awt.Color(255, 255, 255));
jLabel1.setText("DESARROLLO WEB");
jDesktopPane1.add(jLabel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(150, 20, 186, -1));

jLabel2.setForeground(new java.awt.Color(255, 255, 255));


jLabel2.setText("Desarrollo en:");
jDesktopPane1.add(jLabel2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(26, 58, -1, -1));

buttonGroup1.add(rbPaginaWeb);
rbPaginaWeb.setForeground(new java.awt.Color(255, 255, 255));
rbPaginaWeb.setText("Pagina web");
jDesktopPane1.add(rbPaginaWeb, new
org.netbeans.lib.awtextra.AbsoluteConstraints(53, 81, -1, -1));

buttonGroup1.add(rbBlock);
rbBlock.setForeground(new java.awt.Color(255, 255, 255));
rbBlock.setText("Block");
jDesktopPane1.add(rbBlock, new
org.netbeans.lib.awtextra.AbsoluteConstraints(202, 81, -1, -1));

buttonGroup1.add(rbPlataforma);
rbPlataforma.setForeground(new java.awt.Color(255, 255, 255));
rbPlataforma.setText("Plataforma");
jDesktopPane1.add(rbPlataforma, new
org.netbeans.lib.awtextra.AbsoluteConstraints(355, 81, -1, -1));

jLabel3.setForeground(new java.awt.Color(255, 255, 255));


jLabel3.setText("En el ambito de:");
jDesktopPane1.add(jLabel3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(26, 127, -1, -1));

cboAmbito.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] {


"<<-Seleccionar->>", "Pagina Eduactiva", "Pagina FarmaciA", "Pagina Agencia
Publica", "Pagina de Centros Comerciles", "Pagina de Servicios de Redes", "Block
Informatico", "Block de Investigacion", "Bloch Musical", "Block Cultura", "Block
Deporte", "Plataforma de un Colegio", "Plataforma de un Instituto", "Plataforma de una
Universidad", "Plataforma de una Agencia", "Plataformas de Centro de ventas",
"Plataforma de una Biblioeca", "Plataforma ERP" }));
jDesktopPane1.add(cboAmbito, new
org.netbeans.lib.awtextra.AbsoluteConstraints(146, 122, 253, -1));

jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Formas de
Pago"));

chkContado.setText("Contado");
chkContado.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkContadoActionPerformed(evt);
}
});

chkCredito.setText("Credito");
chkCredito.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkCreditoActionPerformed(evt);
}
});

jLabel4.setText("Cuotas:");

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()
.addComponent(chkContado)
.addGap(32, 32, 32)
.addComponent(chkCredito)
.addGap(18, 18, 18)
.addComponent(jLabel4)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtCuotas, javax.swing.GroupLayout.DEFAULT_SIZE, 46,
Short.MAX_VALUE)
.addGap(6, 6, 6))
);
jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.B
ASELINE)
.addComponent(chkContado)
.addComponent(chkCredito)
.addComponent(jLabel4)
.addComponent(txtCuotas, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(15, Short.MAX_VALUE))
);

jDesktopPane1.add(jPanel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(90, 170, -1, -1));

jLabel5.setForeground(new java.awt.Color(255, 255, 255));


jLabel5.setText("Descuento:");
jDesktopPane1.add(jLabel5, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 280, -1, -1));

jLabel6.setForeground(new java.awt.Color(255, 255, 255));


jLabel6.setText("Precio:");
jDesktopPane1.add(jLabel6, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 340, -1, -1));

jLabel7.setForeground(new java.awt.Color(255, 255, 255));


jLabel7.setText("Precio Cuotas:");
jDesktopPane1.add(jLabel7, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 370, -1, -1));
jLabel8.setForeground(new java.awt.Color(255, 255, 255));
jLabel8.setText("Total a Pagar:");
jDesktopPane1.add(jLabel8, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 400, -1, -1));
jDesktopPane1.add(txtDescuento, new
org.netbeans.lib.awtextra.AbsoluteConstraints(120, 280, 140, -1));
jDesktopPane1.add(txtPrecio, new
org.netbeans.lib.awtextra.AbsoluteConstraints(120, 340, 140, -1));
jDesktopPane1.add(txtPrecioCuotas, new
org.netbeans.lib.awtextra.AbsoluteConstraints(120, 370, 140, -1));
jDesktopPane1.add(txtTotalPagar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(120, 400, 140, -1));

btnNuevo.setText("NUEVO");
btnNuevo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnNuevoActionPerformed(evt);
}
});
jDesktopPane1.add(btnNuevo, new
org.netbeans.lib.awtextra.AbsoluteConstraints(340, 280, 90, -1));

btnCalcular.setText("CALCULAR");
btnCalcular.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCalcularActionPerformed(evt);
}
});
jDesktopPane1.add(btnCalcular, new
org.netbeans.lib.awtextra.AbsoluteConstraints(340, 330, -1, -1));

btnCerrar.setText("CERRAR");
btnCerrar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCerrarActionPerformed(evt);
}
});
jDesktopPane1.add(btnCerrar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(340, 380, 90, -1));

jLabel9.setForeground(new java.awt.Color(255, 255, 255));


jLabel9.setText("Incremento:");
jDesktopPane1.add(jLabel9, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 310, -1, -1));
jDesktopPane1.add(txtIncremento, new
org.netbeans.lib.awtextra.AbsoluteConstraints(120, 310, 140, -1));

getContentPane().add(jDesktopPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 480, 480));
pack();
}// </editor-fold>

private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new GESTIONES().setVisible(true);
}

private void btnCalcularActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
double descuento=0.0, incremento=0.0, Pcuota=0.0,Tpagar=0.0;
double precio=0, cuot=0.0;

double dsct = 0,incr = 0;


if(rbPaginaWeb.isSelected()){
precio=500.00;
dsct=0.10;
incr=0.05;
if(chkContado.isSelected()){

descuento=precio*dsct;
incremento=0.0;
Tpagar=precio-descuento+incremento;
Pcuota=cuot;
txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}else{
if(chkCredito.isSelected()){
int cuotas=Integer.parseInt(txtCuotas.getText());
descuento=0.0;
incremento=precio*incr;
Tpagar=precio-descuento+incremento;
Pcuota=Tpagar/cuotas;
txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}
}

}
if(rbBlock.isSelected()){
precio=250;
dsct=0.08;
incr=0.03;
if(chkContado.isSelected()){

descuento=precio*dsct;
incremento=0.0;
Tpagar=precio-descuento+incremento;
Pcuota=cuot;

txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}else{
if(chkCredito.isSelected()){
int cuotas=Integer.parseInt(txtCuotas.getText());
descuento=0.0;
incremento=precio*incr;
Tpagar=precio-descuento+incremento;
Pcuota=Tpagar/cuotas;
txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}
}
}

if(rbPlataforma.isSelected()){
precio=1300;
dsct=0.15;
incr=0.10;
if(chkContado.isSelected()){

descuento=precio*dsct;
incremento=0.0;
Tpagar=precio-descuento+incremento;
Pcuota=cuot;

txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}else{
if(chkCredito.isSelected()){
int cuotas=Integer.parseInt(txtCuotas.getText());
descuento=0.0;
incremento=precio*incr;
Tpagar=precio-descuento+incremento;
Pcuota=Tpagar/cuotas;
txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}
}
}

private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
cboAmbito.setEnabled(true);
txtCuotas.setEnabled(true);
txtCuotas.setText("");
txtDescuento.setText("");
txtIncremento.setText("");
txtPrecio.setText("");
txtPrecioCuotas.setText("");
txtTotalPagar.setText("");

private void chkContadoActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
txtCuotas.setEnabled(false);
}

private void chkCreditoActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
txtCuotas.setEnabled(true);
}

/**
* @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(frmDesarrolloWeb.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(frmDesarrolloWeb.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(frmDesarrolloWeb.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(frmDesarrolloWeb.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new frmDesarrolloWeb().setVisible(true);
}
});
}

// Variables declaration - do not modify


private javax.swing.JButton btnCalcular;
private javax.swing.JButton btnCerrar;
private javax.swing.JButton btnNuevo;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JComboBox<String> cboAmbito;
private javax.swing.JCheckBox chkContado;
private javax.swing.JCheckBox chkCredito;
private javax.swing.JDesktopPane jDesktopPane1;
private javax.swing.JLabel jLabel1;
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.JRadioButton rbBlock;
private javax.swing.JRadioButton rbPaginaWeb;
private javax.swing.JRadioButton rbPlataforma;
private javax.swing.JTextField txtCuotas;
private javax.swing.JTextField txtDescuento;
private javax.swing.JTextField txtIncremento;
private javax.swing.JTextField txtPrecio;
private javax.swing.JTextField txtPrecioCuotas;
private javax.swing.JTextField txtTotalPagar;
// End of variables declaration
}

package ProyectoFinal;

/**
*
* @author YUSELIN
*/
public class frmDiseñoGrafico extends javax.swing.JFrame {

/**
* Creates new form frmDiseñoGrafico
*/
public frmDiseñoGrafico() {
initComponents();
setSize(491, 492);
setVisible(true);
}

/**
* 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() {

buttonGroup1 = new javax.swing.ButtonGroup();


jDesktopPane1 = new javax.swing.JDesktopPane();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
rbPublicidad = new javax.swing.JRadioButton();
rbIso = new javax.swing.JRadioButton();
rbProyectos = new javax.swing.JRadioButton();
jLabel3 = new javax.swing.JLabel();
cboAmbito = new javax.swing.JComboBox<>();
jPanel1 = new javax.swing.JPanel();
chkContado = new javax.swing.JCheckBox();
chkCredito = new javax.swing.JCheckBox();
jLabel4 = new javax.swing.JLabel();
txtCuotas = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
txtDescuento = new javax.swing.JTextField();
txtPrecio = new javax.swing.JTextField();
txtPrecioCuotas = new javax.swing.JTextField();
txtTotalPagar = new javax.swing.JTextField();
btnNuevo = new javax.swing.JButton();
btnCalcular = new javax.swing.JButton();
btnCerrar = new javax.swing.JButton();
jLabel9 = new javax.swing.JLabel();
txtIncremento = new javax.swing.JTextField();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jDesktopPane1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N


jLabel1.setForeground(new java.awt.Color(255, 255, 255));
jLabel1.setText("DISEÑO GRAFICO");
jDesktopPane1.add(jLabel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(161, 25, 186, -1));

jLabel2.setForeground(new java.awt.Color(255, 255, 255));


jLabel2.setText("Diseño en:");
jDesktopPane1.add(jLabel2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(26, 58, -1, -1));

buttonGroup1.add(rbPublicidad);
rbPublicidad.setForeground(new java.awt.Color(255, 255, 255));
rbPublicidad.setText("Publicidad");
rbPublicidad.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rbPublicidadActionPerformed(evt);
}
});
jDesktopPane1.add(rbPublicidad, new
org.netbeans.lib.awtextra.AbsoluteConstraints(53, 81, -1, -1));

buttonGroup1.add(rbIso);
rbIso.setForeground(new java.awt.Color(255, 255, 255));
rbIso.setText("Isotipos - Marcas");
jDesktopPane1.add(rbIso, new org.netbeans.lib.awtextra.AbsoluteConstraints(202,
81, -1, -1));

buttonGroup1.add(rbProyectos);
rbProyectos.setForeground(new java.awt.Color(255, 255, 255));
rbProyectos.setText("Proyectos");
jDesktopPane1.add(rbProyectos, new
org.netbeans.lib.awtextra.AbsoluteConstraints(355, 81, -1, -1));

jLabel3.setForeground(new java.awt.Color(255, 255, 255));


jLabel3.setText("En el ambito de:");
jDesktopPane1.add(jLabel3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(26, 127, -1, -1));

cboAmbito.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] {


"<<-Seleccionar->>", "Publicidad Eduactiva", "Publicidad Farmaceutica", "Publicidad
Agencia Publica", "Publicidad de Centros Comerciles", "Publicidad de Servicios de
Redes", "Publidad de Eventos", "Isotipo Marca de Ropa", "Isotipo Marca de Lentes",
"Isotipo Tienda Comercial", "Isotipo Contructora/Inmobilaria", "Isotipo Empresas",
"Block de Investigacion", "Bloch Musical", "Block Cultura", "Block Deporte",
"Proyecto de Plataformas", "Proyectos de Institutos", "Proyecto de Propagandas
Internacioneles", "Proyectos de Identidades Privadas" }));
jDesktopPane1.add(cboAmbito, new
org.netbeans.lib.awtextra.AbsoluteConstraints(146, 122, 253, -1));

jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Formas de
Pago"));

chkContado.setText("Contado");
chkContado.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkContadoActionPerformed(evt);
}
});

chkCredito.setText("Credito");
chkCredito.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkCreditoActionPerformed(evt);
}
});

jLabel4.setText("Cuotas:");

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()
.addComponent(chkContado)
.addGap(32, 32, 32)
.addComponent(chkCredito)
.addGap(18, 18, 18)
.addComponent(jLabel4)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtCuotas, javax.swing.GroupLayout.DEFAULT_SIZE, 46,
Short.MAX_VALUE)
.addGap(6, 6, 6))
);
jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.B
ASELINE)
.addComponent(chkContado)
.addComponent(chkCredito)
.addComponent(jLabel4)
.addComponent(txtCuotas, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(15, Short.MAX_VALUE))
);
jDesktopPane1.add(jPanel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(90, 170, -1, -1));

jLabel5.setForeground(new java.awt.Color(255, 255, 255));


jLabel5.setText("Descuento:");
jDesktopPane1.add(jLabel5, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 280, -1, -1));

jLabel6.setForeground(new java.awt.Color(255, 255, 255));


jLabel6.setText("Precio:");
jDesktopPane1.add(jLabel6, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 340, -1, -1));

jLabel7.setForeground(new java.awt.Color(255, 255, 255));


jLabel7.setText("Precio Cuotas:");
jDesktopPane1.add(jLabel7, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 370, -1, -1));

jLabel8.setForeground(new java.awt.Color(255, 255, 255));


jLabel8.setText("Total a Pagar:");
jDesktopPane1.add(jLabel8, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 400, -1, -1));
jDesktopPane1.add(txtDescuento, new
org.netbeans.lib.awtextra.AbsoluteConstraints(120, 280, 140, -1));
jDesktopPane1.add(txtPrecio, new
org.netbeans.lib.awtextra.AbsoluteConstraints(120, 340, 140, -1));
jDesktopPane1.add(txtPrecioCuotas, new
org.netbeans.lib.awtextra.AbsoluteConstraints(120, 370, 140, -1));
jDesktopPane1.add(txtTotalPagar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(120, 400, 140, -1));

btnNuevo.setText("NUEVO");
btnNuevo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnNuevoActionPerformed(evt);
}
});
jDesktopPane1.add(btnNuevo, new
org.netbeans.lib.awtextra.AbsoluteConstraints(340, 280, 90, -1));

btnCalcular.setText("CALCULAR");
btnCalcular.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCalcularActionPerformed(evt);
}
});
jDesktopPane1.add(btnCalcular, new
org.netbeans.lib.awtextra.AbsoluteConstraints(340, 330, -1, -1));

btnCerrar.setText("CERRAR");
btnCerrar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCerrarActionPerformed(evt);
}
});
jDesktopPane1.add(btnCerrar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(340, 380, 90, -1));

jLabel9.setForeground(new java.awt.Color(255, 255, 255));


jLabel9.setText("Incremento:");
jDesktopPane1.add(jLabel9, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 310, -1, -1));
jDesktopPane1.add(txtIncremento, new
org.netbeans.lib.awtextra.AbsoluteConstraints(120, 310, 140, -1));

getContentPane().add(jDesktopPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 490, 490));

pack();
}// </editor-fold>

private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new GESTIONES().setVisible(true);
}

private void rbPublicidadActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
}

private void btnCalcularActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
double descuento=0.0, incremento=0.0, Pcuota=0.0,Tpagar=0.0;
double precio=0, cuot=0.0;

double dsct = 0,incr = 0;


if(rbPublicidad.isSelected()){
precio=400.00;
dsct=0.10;
incr=0.05;
if(chkContado.isSelected()){

descuento=precio*dsct;
incremento=0.0;
Tpagar=precio-descuento+incremento;
Pcuota=cuot;
txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}else{
if(chkCredito.isSelected()){
int cuotas=Integer.parseInt(txtCuotas.getText());
descuento=0.0;
incremento=precio*incr;
Tpagar=precio-descuento+incremento;
Pcuota=Tpagar/cuotas;
txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}
}

}
if(rbIso.isSelected()){
precio=600.00;
dsct=0.08;
incr=0.03;
if(chkContado.isSelected()){

descuento=precio*dsct;
incremento=0.0;
Tpagar=precio-descuento+incremento;
Pcuota=cuot;

txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}else{
if(chkCredito.isSelected()){
int cuotas=Integer.parseInt(txtCuotas.getText());
descuento=0.0;
incremento=precio*incr;
Tpagar=precio-descuento+incremento;
Pcuota=Tpagar/cuotas;
txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}
}
}

if(rbProyectos.isSelected()){
precio=1000;
dsct=0.15;
incr=0.10;
if(chkContado.isSelected()){

descuento=precio*dsct;
incremento=0.0;
Tpagar=precio-descuento+incremento;
Pcuota=cuot;

txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}else{
if(chkCredito.isSelected()){
int cuotas=Integer.parseInt(txtCuotas.getText());
descuento=0.0;
incremento=precio*incr;
Tpagar=precio-descuento+incremento;
Pcuota=Tpagar/cuotas;
txtDescuento.setText(String.valueOf(descuento));
txtIncremento.setText(String.valueOf(incremento));
txtPrecio.setText(String.valueOf(precio));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}
}
}
}

private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
cboAmbito.setEnabled(true);
txtCuotas.setEnabled(true);
txtCuotas.setText("");
txtDescuento.setText("");
txtIncremento.setText("");
txtPrecio.setText("");
txtPrecioCuotas.setText("");
txtTotalPagar.setText("");
}

private void chkContadoActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
txtCuotas.setEnabled(false);
}

private void chkCreditoActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
txtCuotas.setEnabled(true);
}

/**
* @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(frmDiseñoGrafico.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(frmDiseñoGrafico.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(frmDiseñoGrafico.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(frmDiseñoGrafico.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new frmDiseñoGrafico().setVisible(true);
}
});
}

// Variables declaration - do not modify


private javax.swing.JButton btnCalcular;
private javax.swing.JButton btnCerrar;
private javax.swing.JButton btnNuevo;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JComboBox<String> cboAmbito;
private javax.swing.JCheckBox chkContado;
private javax.swing.JCheckBox chkCredito;
private javax.swing.JDesktopPane jDesktopPane1;
private javax.swing.JLabel jLabel1;
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.JRadioButton rbIso;
private javax.swing.JRadioButton rbProyectos;
private javax.swing.JRadioButton rbPublicidad;
private javax.swing.JTextField txtCuotas;
private javax.swing.JTextField txtDescuento;
private javax.swing.JTextField txtIncremento;
private javax.swing.JTextField txtPrecio;
private javax.swing.JTextField txtPrecioCuotas;
private javax.swing.JTextField txtTotalPagar;
// End of variables declaration
}
package ProyectoFinal;
import javax.swing.*;
/**
*
* @author YUSELIN
*/

public class frmDESARROLLO_SISTEMAS extends javax.swing.JFrame {

private DefaultListModel modelo1 = new DefaultListModel();


private DefaultListModel modelo2 = new DefaultListModel();
private DefaultListModel modelo3 = new DefaultListModel();
private DefaultListModel modelo4 = new DefaultListModel();

/**
* Creates new form frmDESARROLLO_SISTEMAS
*/
public frmDESARROLLO_SISTEMAS() {
initComponents();
lstSistemas.setModel(modelo1);
lstCostos.setModel(modelo2);
lstSis.setModel(modelo3);
lstCos.setModel(modelo4);
btnAgregar.setEnabled(false);
btnQuitar.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() {

buttonGroup1 = new javax.swing.ButtonGroup();


jDesktopPane1 = new javax.swing.JDesktopPane();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
cboDesarrollo = new javax.swing.JComboBox<>();
jScrollPane1 = new javax.swing.JScrollPane();
lstSistemas = new javax.swing.JList<>();
jScrollPane2 = new javax.swing.JScrollPane();
lstCostos = new javax.swing.JList<>();
btnAgregar = new javax.swing.JButton();
btnQuitar = new javax.swing.JButton();
jScrollPane3 = new javax.swing.JScrollPane();
lstSis = new javax.swing.JList<>();
jScrollPane4 = new javax.swing.JScrollPane();
lstCos = new javax.swing.JList<>();
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();
txtTotal = new javax.swing.JTextField();
jLabel8 = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
jLabel9 = new javax.swing.JLabel();
txtCuotas = new javax.swing.JTextField();
rbContado = new javax.swing.JRadioButton();
rbCredito = new javax.swing.JRadioButton();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
txtDescuento = new javax.swing.JTextField();
txtIncremento = new javax.swing.JTextField();
txtPrecioTotal = new javax.swing.JTextField();
txtPrecioCuotas = new javax.swing.JTextField();
txtTotalPagar = new javax.swing.JTextField();
btnNuevo = new javax.swing.JButton();
btnCalcular = new javax.swing.JButton();
btnCerrar = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jDesktopPane1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setFont(new java.awt.Font("Times New Roman", 3, 18)); // NOI18N


jLabel1.setForeground(new java.awt.Color(255, 255, 255));
jLabel1.setText("DESARROLLO DE SISTEMAS - PROGRAMACION");
jDesktopPane1.add(jLabel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(110, 20, 420, -1));

jLabel2.setForeground(new java.awt.Color(255, 255, 255));


jLabel2.setText("Desarrollo en:");
jDesktopPane1.add(jLabel2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(50, 70, -1, -1));

cboDesarrollo.setModel(new javax.swing.DefaultComboBoxModel<>(new
String[] { "<<-Seleccionar->>", "Sistemas Operativos", "Sistemas Gestiones",
"Software ", "App iOS", "App Android", " " }));
cboDesarrollo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cboDesarrolloActionPerformed(evt);
}
});
jDesktopPane1.add(cboDesarrollo, new
org.netbeans.lib.awtextra.AbsoluteConstraints(160, 70, 180, -1));

lstSistemas.addListSelectionListener(new
javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
lstSistemasValueChanged(evt);
}
});
jScrollPane1.setViewportView(lstSistemas);

jDesktopPane1.add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 160, 160, 180));

jScrollPane2.setViewportView(lstCostos);

jDesktopPane1.add(jScrollPane2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(190, 160, 70, 180));
btnAgregar.setText("AGREGAR");
btnAgregar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAgregarActionPerformed(evt);
}
});
jDesktopPane1.add(btnAgregar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(280, 210, -1, -1));

btnQuitar.setText("QUITAR");
btnQuitar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnQuitarActionPerformed(evt);
}
});
jDesktopPane1.add(btnQuitar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(280, 260, 90, -1));

lstSis.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
lstSisValueChanged(evt);
}
});
jScrollPane3.setViewportView(lstSis);

jDesktopPane1.add(jScrollPane3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(390, 160, 160, 180));

jScrollPane4.setViewportView(lstCos);

jDesktopPane1.add(jScrollPane4, new
org.netbeans.lib.awtextra.AbsoluteConstraints(550, 160, 70, 180));

jLabel3.setForeground(new java.awt.Color(255, 255, 255));


jLabel3.setText("Sistemas:");
jDesktopPane1.add(jLabel3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 130, -1, -1));

jLabel4.setForeground(new java.awt.Color(255, 255, 255));


jLabel4.setText("Costos:");
jDesktopPane1.add(jLabel4, new
org.netbeans.lib.awtextra.AbsoluteConstraints(190, 130, -1, -1));

jLabel5.setForeground(new java.awt.Color(255, 255, 255));


jLabel5.setText("Sistemas Seleccionados:");
jDesktopPane1.add(jLabel5, new
org.netbeans.lib.awtextra.AbsoluteConstraints(390, 130, -1, -1));

jLabel6.setForeground(new java.awt.Color(255, 255, 255));


jLabel6.setText("Costos");
jDesktopPane1.add(jLabel6, new
org.netbeans.lib.awtextra.AbsoluteConstraints(550, 130, -1, -1));

jLabel7.setFont(new java.awt.Font("Dialog", 1, 11)); // NOI18N


jLabel7.setForeground(new java.awt.Color(255, 255, 255));
jLabel7.setText("TOTAL:");
jDesktopPane1.add(jLabel7, new
org.netbeans.lib.awtextra.AbsoluteConstraints(500, 350, -1, -1));
jDesktopPane1.add(txtTotal, new
org.netbeans.lib.awtextra.AbsoluteConstraints(550, 339, 70, 30));

jLabel8.setForeground(new java.awt.Color(255, 255, 255));


jLabel8.setText("DESCUENTO:");
jDesktopPane1.add(jLabel8, new
org.netbeans.lib.awtextra.AbsoluteConstraints(40, 520, -1, -1));

jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Formas de
Pago"));
jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel9.setText("Cuotas:");
jPanel1.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(179, 31, -
1, -1));
jPanel1.add(txtCuotas, new org.netbeans.lib.awtextra.AbsoluteConstraints(234, 29,
55, -1));

buttonGroup1.add(rbContado);
rbContado.setText("Contado");
rbContado.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rbContadoActionPerformed(evt);
}
});
jPanel1.add(rbContado, new org.netbeans.lib.awtextra.AbsoluteConstraints(13, 27,
-1, -1));

buttonGroup1.add(rbCredito);
rbCredito.setText("Credito");
rbCredito.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rbCreditoActionPerformed(evt);
}
});
jPanel1.add(rbCredito, new org.netbeans.lib.awtextra.AbsoluteConstraints(96, 27,
-1, -1));

jDesktopPane1.add(jPanel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 360, 310, 70));

jLabel10.setForeground(new java.awt.Color(255, 255, 255));


jLabel10.setText("INCREMENTO:");
jDesktopPane1.add(jLabel10, new
org.netbeans.lib.awtextra.AbsoluteConstraints(40, 560, -1, -1));

jLabel11.setForeground(new java.awt.Color(255, 255, 255));


jLabel11.setText("PRECIO TOTAL:");
jDesktopPane1.add(jLabel11, new
org.netbeans.lib.awtextra.AbsoluteConstraints(40, 600, -1, -1));

jLabel12.setForeground(new java.awt.Color(255, 255, 255));


jLabel12.setText("PRECIO CUOTAS:");
jDesktopPane1.add(jLabel12, new
org.netbeans.lib.awtextra.AbsoluteConstraints(370, 520, -1, -1));

jLabel13.setForeground(new java.awt.Color(255, 255, 255));


jLabel13.setText("TOTAL A PAGAR:");
jDesktopPane1.add(jLabel13, new
org.netbeans.lib.awtextra.AbsoluteConstraints(370, 560, -1, -1));
jDesktopPane1.add(txtDescuento, new
org.netbeans.lib.awtextra.AbsoluteConstraints(130, 520, 130, -1));
jDesktopPane1.add(txtIncremento, new
org.netbeans.lib.awtextra.AbsoluteConstraints(130, 560, 130, -1));
jDesktopPane1.add(txtPrecioTotal, new
org.netbeans.lib.awtextra.AbsoluteConstraints(130, 600, 130, -1));
jDesktopPane1.add(txtPrecioCuotas, new
org.netbeans.lib.awtextra.AbsoluteConstraints(480, 520, 130, -1));
jDesktopPane1.add(txtTotalPagar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(480, 550, 130, -1));

btnNuevo.setText("NUEVO");
btnNuevo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnNuevoActionPerformed(evt);
}
});
jDesktopPane1.add(btnNuevo, new
org.netbeans.lib.awtextra.AbsoluteConstraints(90, 460, 90, -1));

btnCalcular.setText("CALCULAR");
btnCalcular.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCalcularActionPerformed(evt);
}
});
jDesktopPane1.add(btnCalcular, new
org.netbeans.lib.awtextra.AbsoluteConstraints(280, 460, -1, -1));

btnCerrar.setText("CERRAR");
btnCerrar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCerrarActionPerformed(evt);
}
});
jDesktopPane1.add(btnCerrar, new
org.netbeans.lib.awtextra.AbsoluteConstraints(460, 460, 90, -1));

getContentPane().add(jDesktopPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 660, 670));

pack();
}// </editor-fold>

private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
this.setVisible(false);
new GESTIONES().setVisible(true);
}

private void cboDesarrolloActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
int indice=cboDesarrollo.getSelectedIndex();
switch(indice)
{
case 0:
modelo1.clear(); modelo2.clear();
break;
case 1:
modelo1.clear(); modelo2.clear();
modelo1.addElement("PANDA"); modelo2.addElement("280");
modelo1.addElement("FLASH XT"); modelo2.addElement("370");
modelo1.addElement("DESTUR Z"); modelo2.addElement("290");
modelo1.addElement("WIXKO"); modelo2.addElement("400");
modelo1.addElement("KAPTU"); modelo2.addElement("970");
modelo1.addElement("DIFIXION"); modelo2.addElement("1000");
break;
case 2:
modelo1.clear();modelo2.clear();
modelo1.addElement("Sistema de control"); modelo2.addElement("100");
modelo1.addElement("Sistema de ventas"); modelo2.addElement("120");
modelo1.addElement("Sistema de compras"); modelo2.addElement("180");
modelo1.addElement("Sistema de registro"); modelo2.addElement("200");
modelo1.addElement("Sistema de emergencias"); modelo2.addElement("240");
modelo1.addElement("Sistema de Grabacion"); modelo2.addElement("280");
break;
case 3:
modelo1.clear();modelo2.clear();
modelo1.addElement("Software Libre"); modelo2.addElement("300");
modelo1.addElement("Software Licenciado "); modelo2.addElement("700");

break;
case 4:
modelo1.clear();modelo2.clear();
modelo1.addElement("APP JUEGOS"); modelo2.addElement("270");
modelo1.addElement("APP MUSICA "); modelo2.addElement("400");
modelo1.addElement("APP ANTIVIRUS "); modelo2.addElement("380");
modelo1.addElement("APP FOTO "); modelo2.addElement("420");
modelo1.addElement("APP VIDEOS "); modelo2.addElement("600");
modelo1.addElement("APP TEMAS-FONDOS "); modelo2.addElement("450");

break;
case 5:
modelo1.clear();modelo2.clear();
modelo1.addElement("APP JUEGOS"); modelo2.addElement("600");
modelo1.addElement("APP MUSICA "); modelo2.addElement("400");
modelo1.addElement("APP ANTIVIRUS "); modelo2.addElement("580");
modelo1.addElement("APP FOTO "); modelo2.addElement("420");
modelo1.addElement("APP VIDEOS "); modelo2.addElement("600");
modelo1.addElement("APP TEMAS-FONDOS "); modelo2.addElement("650");
break;
}
}
private void btnAgregarActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String sistema, costo;
int cuenta,total=0,i;
sistema=(String)lstSistemas.getSelectedValue();
costo=(String)lstCostos.getSelectedValue();
modelo3.addElement(sistema);
modelo4.addElement(costo);
cuenta=modelo4.size();
for(i=0;i<cuenta;i++)
total=total+Integer.parseInt((String)modelo4.elementAt(i));
txtTotal.setText(String.valueOf(total));
btnAgregar.setEnabled(false);

private void lstSistemasValueChanged(javax.swing.event.ListSelectionEvent evt) {


// TODO add your handling code here:
int indice=lstSistemas.getSelectedIndex();
lstCostos.setSelectedIndex(indice);
btnAgregar.setEnabled(true);
}

private void lstSisValueChanged(javax.swing.event.ListSelectionEvent evt) {


// TODO add your handling code here:
int indice=lstSis.getSelectedIndex();
lstCos.setSelectedIndex(indice);
btnQuitar.setEnabled(true);
}

private void btnCalcularActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
double desc=0, incre=0 , precio=0, Pcuota, Tpagar,cuota=0.0;
int total;
total=Integer.parseInt(txtTotal.getText());

if (rbContado.isSelected()){
desc=total*0.10;
incre=0.0;
Pcuota=cuota;
Tpagar=total-desc+incre;

txtDescuento.setText(String.valueOf(desc));
txtIncremento.setText(String.valueOf(incre));
txtPrecioTotal.setText(String.valueOf(total));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));
}
if (rbCredito.isSelected()){
int cuotas=Integer.parseInt(txtCuotas.getText());

desc=0.0;
incre=total*0.15;
Pcuota=total/cuotas;
Tpagar=total-desc+incre;
txtDescuento.setText(String.valueOf(desc));
txtIncremento.setText(String.valueOf(incre));
txtPrecioTotal.setText(String.valueOf(total));
txtPrecioCuotas.setText(String.valueOf(Pcuota));
txtTotalPagar.setText(String.valueOf(Tpagar));

private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:

modelo1.clear();
modelo2.clear();
modelo3.clear();
modelo4.clear();
cboDesarrollo.setEnabled(true);
txtCuotas.setEnabled(true);
txtCuotas.setText("");
txtDescuento.setText("");
txtIncremento.setText("");
txtTotal.setText("");
txtPrecioTotal.setText("");
txtPrecioCuotas.setText("");
txtTotalPagar.setText("");

}
private void btnQuitarActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int indice=lstSis.getSelectedIndex();
modelo3.remove(indice);
modelo4.remove(indice);
btnQuitar.setEnabled(false);
}

private void rbContadoActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
txtCuotas.setEnabled(false);
}

private void rbCreditoActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
txtCuotas.setEnabled(true);
}

/**
* @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(frmDESARROLLO_SISTEMAS.class.getName()).l
og(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(frmDESARROLLO_SISTEMAS.class.getName()).l
og(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(frmDESARROLLO_SISTEMAS.class.getName()).l
og(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(frmDESARROLLO_SISTEMAS.class.getName()).l
og(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new frmDESARROLLO_SISTEMAS().setVisible(true);
}
});
}

// Variables declaration - do not modify


private javax.swing.JButton btnAgregar;
private javax.swing.JButton btnCalcular;
private javax.swing.JButton btnCerrar;
private javax.swing.JButton btnNuevo;
private javax.swing.JButton btnQuitar;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JComboBox<String> cboDesarrollo;
private javax.swing.JDesktopPane jDesktopPane1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
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.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JScrollPane jScrollPane4;
private javax.swing.JList<String> lstCos;
private javax.swing.JList<String> lstCostos;
private javax.swing.JList<String> lstSis;
private javax.swing.JList<String> lstSistemas;
private javax.swing.JRadioButton rbContado;
private javax.swing.JRadioButton rbCredito;
private javax.swing.JTextField txtCuotas;
private javax.swing.JTextField txtDescuento;
private javax.swing.JTextField txtIncremento;
private javax.swing.JTextField txtPrecioCuotas;
private javax.swing.JTextField txtPrecioTotal;
private javax.swing.JTextField txtTotal;
private javax.swing.JTextField txtTotalPagar;
// End of variables declaration
}

“QUEDA PENDIENTE EL FORUMARIO DE SERVICIO TECNICO Y LOS


FORMULARIOS DE PRODUCTOS Y EDUCACION”

Вам также может понравиться