Metodologia Programacion Java
Ejercicio 1
JAVA
package ejerciciog21;
/**
*
* @author EMILY MENDOZA
*/
public class FrmEjercicio1 extends javax.swing.JFrame {
/** Creates new form FrmEjercicio1 */
public FrmEjercicio1() {
initComponents();
}
/** 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() {
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();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jtxtB100 = new javax.swing.JTextField();
jtxtB20 = new javax.swing.JTextField();
jtxtB10 = new javax.swing.JTextField();
jtxtM5 = new javax.swing.JTextField();
jtxtM1 = newjavax.swing.JTextField();
jtxtSueldo = new javax.swing.JTextField();
jbtnNuevo = new javax.swing.JButton();
jbtnCalcular = new javax.swing.JButton();
jbtnSalir = new javax.swing.JButton();
jtxtB50 = new javax.swing.JTextField();
jLabel8 = new javax.swing.JLabel();setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setText("Billetes de 100");
jLabel2.setText("Billetes de 50");
jLabel3.setText("Billetes de 20");
jLabel4.setText("Billetes de 10");
jLabel5.setText("Monedas de 5");
jLabel6.setText("Monedas de 1");
jLabel7.setText("Sueldo");
jbtnNuevo.setText("Nuevo");
jbtnNuevo.addActionListener(newjava.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jbtnNuevoActionPerformed(evt);
}
});
jbtnCalcular.setText("Calcular");
jbtnCalcular.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {jbtnCalcularActionPerformed(evt);
}
});
jbtnSalir.setText("Salir");
jbtnSalir.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jbtnSalirActionPerformed(evt);
}
});
jLabel8.setFont(new java.awt.Font("Tahoma", 1, 14)); //NOI18N
jLabel8.setText("DISTRIBUICIÓN DE BILLETES Y MONEDAS EN SUELDO");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup().addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel2)
.addComponent(jLabel3)...
Regístrate para leer el documento completo.