Академический Документы
Профессиональный Документы
Культура Документы
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.
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() {
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));
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));
jDesktopPane2.add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(20, 270, 510, 120));
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>
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("");
/**
* @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);
}
});
}
/**
*
* @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() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jDesktopPane1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
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));
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:");
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));
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));
getContentPane().add(jDesktopPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 480, 480));
pack();
}// </editor-fold>
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));
}
}
}
/**
* @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>
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() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jDesktopPane1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
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));
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:");
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));
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));
getContentPane().add(jDesktopPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 490, 490));
pack();
}// </editor-fold>
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));
}
}
}
}
/**
* @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>
/**
* 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() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jDesktopPane1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
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));
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));
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>
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);
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));
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);
}
/**
* @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>