Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package inventario;
- public class mas extends javax.swing.JFrame {
- public mas() {
- initComponents();
- }
- ventana ventana = new ventana();
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">
- private void initComponents() {
- btnsi = new javax.swing.JButton();
- btnno = new javax.swing.JButton();
- jLabel1 = new javax.swing.JLabel();
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
- btnsi.setText("SÍ");
- btnsi.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnsiActionPerformed(evt);
- }
- });
- btnno.setText("NO");
- btnno.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnnoActionPerformed(evt);
- }
- });
- jLabel1.setText("Desea realizar más compras?");
- 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.TRAILING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(btnsi)
- .addGap(48, 48, 48)
- .addComponent(btnno))
- .addComponent(jLabel1))
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGap(24, 24, 24)
- .addComponent(jLabel1)
- .addGap(38, 38, 38)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(btnsi)
- .addComponent(btnno))
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- pack();
- }// </editor-fold>
- private void btnsiActionPerformed(java.awt.event.ActionEvent evt) {
- ventana.cambiarvalores();
- ventana open=new ventana();
- open.setVisible(true);
- open.setLocationRelativeTo(null);
- dispose();
- }
- private void btnnoActionPerformed(java.awt.event.ActionEvent evt) {
- System.exit(0);
- }
- public static void main(String args[]) {
- java.awt.EventQueue.invokeLater(() -> {
- new mas().setVisible(true);
- });
- }
- // Variables declaration - do not modify
- private javax.swing.JButton btnno;
- private javax.swing.JButton btnsi;
- private javax.swing.JLabel jLabel1;
- // End of variables declaration
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement