Untitled
unknown
plain_text
a year ago
6.8 kB
5
Indexable
package botica; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.JLabel; import javax.swing.JTextField; import java.awt.Font; import javax.swing.SwingConstants; import javax.swing.JButton; import java.awt.List; import javax.swing.border.TitledBorder; import javax.swing.JComboBox; import javax.swing.DefaultComboBoxModel; public class ventas extends JFrame { private JPanel contentPane; private JTextField textCodigo; private JTextField textNomProducto; private JLabel lblNewLabel_2; private JButton btnNewButton; private JButton btnBuscarProducto; private JLabel lblNewLabel_3; private JLabel lblCodigoPed; private JTextField textField; private JTextField textField_1; private JLabel lblProducto; private JLabel lblNewLabel_4; private JTextField textField_2; private JLabel lblCantidad; private JTextField textField_3; private JLabel lblPU; private JTextField textField_4; private JLabel lblNewLabel_5; private JTextField textField_5; private JButton btnVender; private JButton btnLimpiar; private JPanel panel_1; private List list; private JLabel lblNewLabel_6; private JTextField textField_6; private JComboBox cmbFormaPago; private JComboBox cmbFormaPago_1; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { ventas frame = new ventas(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ public ventas() { setTitle("Ventas"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 521, 510); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JLabel lblNewLabel = new JLabel("Código:"); lblNewLabel.setBounds(10, 43, 62, 14); contentPane.add(lblNewLabel); textCodigo = new JTextField(); textCodigo.setBounds(70, 40, 86, 20); contentPane.add(textCodigo); textCodigo.setColumns(10); JLabel lblNewLabel_1 = new JLabel("Producto:"); lblNewLabel_1.setBounds(10, 71, 62, 14); contentPane.add(lblNewLabel_1); textNomProducto = new JTextField(); textNomProducto.setText("Muestra nombre del Producto"); textNomProducto.setColumns(10); textNomProducto.setBounds(70, 68, 354, 20); contentPane.add(textNomProducto); lblNewLabel_2 = new JLabel("VENTAS BOTICAS BIENMEDIC"); lblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER); lblNewLabel_2.setFont(new Font("Tahoma", Font.BOLD, 12)); lblNewLabel_2.setBounds(10, 11, 414, 14); contentPane.add(lblNewLabel_2); btnNewButton = new JButton("Seleccionar"); btnNewButton.setBounds(335, 39, 89, 23); contentPane.add(btnNewButton); List listProductosAlternativos = new List(); listProductosAlternativos.setBounds(10, 140, 414, 75); contentPane.add(listProductosAlternativos); btnBuscarProducto = new JButton("Buscar"); btnBuscarProducto.setBounds(241, 39, 89, 23); contentPane.add(btnBuscarProducto); lblNewLabel_3 = new JLabel("Lista de Productos Alternativos:"); lblNewLabel_3.setBounds(10, 120, 185, 14); contentPane.add(lblNewLabel_3); JPanel panel = new JPanel(); panel.setBorder(new TitledBorder(null, "Ingreso de Pedido", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel.setBounds(10, 221, 485, 112); contentPane.add(panel); panel.setLayout(null); lblCodigoPed = new JLabel("Código"); lblCodigoPed.setBounds(10, 24, 67, 14); panel.add(lblCodigoPed); textField = new JTextField(); textField.setBounds(10, 44, 86, 20); panel.add(textField); textField.setColumns(10); textField_1 = new JTextField(); textField_1.setBounds(106, 44, 177, 20); panel.add(textField_1); textField_1.setColumns(10); lblProducto = new JLabel("Producto"); lblProducto.setBounds(108, 24, 67, 14); panel.add(lblProducto); lblCantidad = new JLabel("Cantidad"); lblCantidad.setBounds(298, 24, 67, 14); panel.add(lblCantidad); textField_3 = new JTextField(); textField_3.setBounds(293, 44, 86, 20); panel.add(textField_3); textField_3.setColumns(10); lblPU = new JLabel("Precio Unitario"); lblPU.setBounds(389, 24, 86, 14); panel.add(lblPU); textField_4 = new JTextField(); textField_4.setColumns(10); textField_4.setBounds(389, 44, 86, 20); panel.add(textField_4); lblNewLabel_5 = new JLabel("Total Producto:"); lblNewLabel_5.setBounds(10, 75, 86, 14); panel.add(lblNewLabel_5); textField_5 = new JTextField(); textField_5.setBounds(106, 72, 86, 20); panel.add(textField_5); textField_5.setColumns(10); btnVender = new JButton("Vender"); btnVender.setBounds(202, 71, 89, 23); panel.add(btnVender); btnLimpiar = new JButton("Limpiar"); btnLimpiar.setBounds(298, 71, 89, 23); panel.add(btnLimpiar); lblNewLabel_4 = new JLabel("Precio:"); lblNewLabel_4.setBounds(10, 96, 62, 14); contentPane.add(lblNewLabel_4); textField_2 = new JTextField(); textField_2.setColumns(10); textField_2.setBounds(70, 93, 86, 20); contentPane.add(textField_2); panel_1 = new JPanel(); panel_1.setBorder(new TitledBorder(null, "Detalle de Pedido", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_1.setBounds(10, 344, 485, 86); contentPane.add(panel_1); panel_1.setLayout(null); list = new List(); list.setBounds(10, 16, 465, 60); panel_1.add(list); lblNewLabel_6 = new JLabel("Forma de Pago:"); lblNewLabel_6.setBounds(20, 441, 96, 14); contentPane.add(lblNewLabel_6); cmbFormaPago = new JComboBox(); cmbFormaPago.setModel(new DefaultComboBoxModel(new String[] {"Crédito", "Efectivo", "Tarjeta"})); cmbFormaPago.setBounds(126, 437, 107, 22); contentPane.add(cmbFormaPago); JLabel lblGenComprobante = new JLabel("Generar Comprobante:"); lblGenComprobante.setBounds(241, 441, 137, 14); contentPane.add(lblGenComprobante); cmbFormaPago_1 = new JComboBox(); cmbFormaPago_1.setModel(new DefaultComboBoxModel(new String[] {"Factura", "Boleta"})); cmbFormaPago_1.setBounds(388, 437, 107, 22); contentPane.add(cmbFormaPago_1); JLabel lblCantDisp = new JLabel("Cantidad Disponible:"); lblCantDisp.setBounds(214, 96, 116, 14); contentPane.add(lblCantDisp); textField_6 = new JTextField(); textField_6.setBounds(338, 93, 86, 20); contentPane.add(textField_6); textField_6.setColumns(10); } }
Editor is loading...
Leave a Comment