Proyecto Empresa Autonomo Java
Enviado por MatheoP45 • 24 de Abril de 2022 • Tarea • 8.223 Palabras (33 Páginas) • 76 Visitas
PONTIFICIA UNIVERSIDAD CATÓLICA DEL ECUADOR
FACULTAD DE INGENIERÍA
PROGRAMACIÓN ORIENTADA A OBJETOS
FECHA: 24/04/2022
NIVEL: 4to
TEMA: Proyecto Empresa Autonomo
OBJETIVO:
- Programa 1
Diagrama UML de clases:
[pic 1]
Código Fuente:
package proyectoempresaautonomo;
import java.awt.Color;
import java.util.ArrayList;
/**
*
* @author estudiante
*/
public class ProyectoEmpresaAutonomo {
public static ArrayList<Producto> listaProductos=new ArrayList();
public static ArrayList<Cliente> listaClientes=new ArrayList();
public static ArrayList<Factura> listaFacturas=new ArrayList();
public static void main(String[] args) {
// TODO code application logic here
MenuPrincipal a = new MenuPrincipal();
a.setSize(500,450);
a.setVisible(true);
a.setBackground(Color.yellow);
}
}
package proyectoempresaautonomo;
/**
*
* @author estudiante
*/
public class IngresarProducto extends javax.swing.JFrame {
/**
* Creates new form NewJFrame
*/
public IngresarProducto() {
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() {
jPanel1 = new javax.swing.JPanel();
jLabel6 = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jTextField4 = new javax.swing.JTextField();
jTextField3 = new javax.swing.JTextField();
jTextField5 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jPanel1.setLayout(new java.awt.GridLayout(6, 0, 0, 25));
jLabel6.setFont(new java.awt.Font("Yu Gothic Medium", 3, 24)); // NOI18N
jLabel6.setForeground(new java.awt.Color(255, 51, 51));
jLabel6.setText("Ingrese el Producto");
jPanel1.add(jLabel6);
jLabel1.setBackground(new java.awt.Color(0, 153, 153));
jLabel1.setFont(new java.awt.Font("Yu Gothic Light", 1, 18)); // NOI18N
jLabel1.setForeground(new java.awt.Color(153, 0, 153));
jLabel1.setText("Codigo");
jPanel1.add(jLabel1);
jLabel2.setBackground(new java.awt.Color(0, 153, 153));
jLabel2.setFont(new java.awt.Font("Yu Gothic Light", 1, 18)); // NOI18N
jLabel2.setForeground(new java.awt.Color(153, 0, 153));
jLabel2.setText("Nombre");
jPanel1.add(jLabel2);
jLabel3.setBackground(new java.awt.Color(0, 153, 153));
jLabel3.setFont(new java.awt.Font("Yu Gothic Light", 1, 18)); // NOI18N
jLabel3.setForeground(new java.awt.Color(153, 0, 153));
jLabel3.setText("Descripcion");
jPanel1.add(jLabel3);
jLabel5.setFont(new java.awt.Font("Yu Gothic Light", 1, 18)); // NOI18N
jLabel5.setForeground(new java.awt.Color(153, 0, 153));
jLabel5.setText("Precio");
jPanel1.add(jLabel5);
jLabel4.setBackground(new java.awt.Color(0, 153, 153));
jLabel4.setFont(new java.awt.Font("Yu Gothic Light", 1, 18)); // NOI18N
jLabel4.setForeground(new java.awt.Color(153, 0, 153));
jLabel4.setText("Nombre del Proveedor");
jPanel1.add(jLabel4);
jPanel2.setLayout(new java.awt.GridLayout(5, 0, 1, 35));
jTextField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);
}
});
jPanel2.add(jTextField1);
jPanel2.add(jTextField2);
jPanel2.add(jTextField4);
...