Advertisement
Guest User

Untitled

a guest
Dec 16th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.71 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package conviviodei;
  7.  
  8.  
  9. import java.util.ArrayList;
  10.  
  11. /**
  12.  *
  13.  * @author admin
  14.  */
  15. public class MenuInicial extends javax.swing.JFrame {
  16.     public ConvivioDEI convivio;
  17.  
  18.     /**
  19.      * Creates new form MenuInicial
  20.      */
  21.     public MenuInicial(ConvivioDEI convivio) {
  22.         this.convivio=convivio;
  23.         initComponents();
  24.         setLocationRelativeTo(null);
  25.     }
  26.  
  27.     /**
  28.      * This method is called from within the constructor to initialize the form.
  29.      * WARNING: Do NOT modify this code. The content of this method is always
  30.      * regenerated by the Form Editor.
  31.      */
  32.     @SuppressWarnings("unchecked")
  33.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  34.     private void initComponents() {
  35.  
  36.         jFrame1 = new javax.swing.JFrame();
  37.         jLabel1 = new javax.swing.JLabel();
  38.         btn_entrar = new javax.swing.JButton();
  39.         btn_entrar2 = new javax.swing.JButton();
  40.         jLabel2 = new javax.swing.JLabel();
  41.  
  42.         javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
  43.         jFrame1.getContentPane().setLayout(jFrame1Layout);
  44.         jFrame1Layout.setHorizontalGroup(
  45.             jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  46.             .addGap(0, 400, Short.MAX_VALUE)
  47.         );
  48.         jFrame1Layout.setVerticalGroup(
  49.             jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  50.             .addGap(0, 300, Short.MAX_VALUE)
  51.         );
  52.  
  53.         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  54.  
  55.         jLabel1.setFont(new java.awt.Font("Tahoma", 0, 28)); // NOI18N
  56.         jLabel1.setText("Serão Convívio de POO");
  57.  
  58.         btn_entrar.setFont(new java.awt.Font("Tahoma", 0, 19)); // NOI18N
  59.         btn_entrar.setForeground(new java.awt.Color(255, 0, 51));
  60.         btn_entrar.setText("Entrar");
  61.         btn_entrar.addActionListener(new java.awt.event.ActionListener() {
  62.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  63.                 btn_entrarActionPerformed(evt);
  64.             }
  65.         });
  66.  
  67.         btn_entrar2.setFont(new java.awt.Font("Tahoma", 0, 19)); // NOI18N
  68.         btn_entrar2.setForeground(new java.awt.Color(255, 0, 51));
  69.         btn_entrar2.setText("Terminar");
  70.         btn_entrar2.addActionListener(new java.awt.event.ActionListener() {
  71.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  72.                 btn_entrar2ActionPerformed(evt);
  73.             }
  74.         });
  75.  
  76.         jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/conviviodei/dei.png"))); // NOI18N
  77.         jLabel2.setText("jLabel2");
  78.  
  79.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  80.         getContentPane().setLayout(layout);
  81.         layout.setHorizontalGroup(
  82.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  83.             .addGroup(layout.createSequentialGroup()
  84.                 .addGap(0, 0, Short.MAX_VALUE)
  85.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  86.                     .addComponent(btn_entrar2, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
  87.                     .addComponent(btn_entrar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  88.                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  89.             .addGroup(layout.createSequentialGroup()
  90.                 .addContainerGap()
  91.                 .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
  92.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)
  93.                 .addComponent(jLabel1)
  94.                 .addGap(26, 26, 26))
  95.         );
  96.         layout.setVerticalGroup(
  97.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  98.             .addGroup(layout.createSequentialGroup()
  99.                 .addContainerGap()
  100.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  101.                     .addComponent(jLabel2)
  102.                     .addComponent(jLabel1))
  103.                 .addGap(30, 30, 30)
  104.                 .addComponent(btn_entrar)
  105.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  106.                 .addComponent(btn_entrar2)
  107.                 .addContainerGap(24, Short.MAX_VALUE))
  108.         );
  109.  
  110.         pack();
  111.     }// </editor-fold>                        
  112.  
  113.     private void btn_entrarActionPerformed(java.awt.event.ActionEvent evt) {                                          
  114.         new MenuInicial(convivio).setVisible(false);
  115.         new MainMenu(convivio).setVisible(true); // TODO add your handling code here:
  116.     }                                          
  117.  
  118.     private void btn_entrar2ActionPerformed(java.awt.event.ActionEvent evt) {                                            
  119.         System.exit(0);// TODO add your handling code here:
  120.     }                                          
  121.  
  122.     /**
  123.      * @param args the command line arguments
  124.      */
  125.  
  126.  
  127.     // Variables declaration - do not modify                    
  128.     private javax.swing.JButton btn_entrar;
  129.     private javax.swing.JButton btn_entrar2;
  130.     private javax.swing.JFrame jFrame1;
  131.     private javax.swing.JLabel jLabel1;
  132.     private javax.swing.JLabel jLabel2;
  133.     // End of variables declaration                  
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement