Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package conviviodei;
- import java.util.ArrayList;
- /**
- *
- * @author admin
- */
- public class MenuInicial extends javax.swing.JFrame {
- public ConvivioDEI convivio;
- /**
- * Creates new form MenuInicial
- */
- public MenuInicial(ConvivioDEI convivio) {
- this.convivio=convivio;
- initComponents();
- setLocationRelativeTo(null);
- }
- /**
- * 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() {
- jFrame1 = new javax.swing.JFrame();
- jLabel1 = new javax.swing.JLabel();
- btn_entrar = new javax.swing.JButton();
- btn_entrar2 = new javax.swing.JButton();
- jLabel2 = new javax.swing.JLabel();
- javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
- jFrame1.getContentPane().setLayout(jFrame1Layout);
- jFrame1Layout.setHorizontalGroup(
- jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 400, Short.MAX_VALUE)
- );
- jFrame1Layout.setVerticalGroup(
- jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 300, Short.MAX_VALUE)
- );
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
- jLabel1.setFont(new java.awt.Font("Tahoma", 0, 28)); // NOI18N
- jLabel1.setText("Serão Convívio de POO");
- btn_entrar.setFont(new java.awt.Font("Tahoma", 0, 19)); // NOI18N
- btn_entrar.setForeground(new java.awt.Color(255, 0, 51));
- btn_entrar.setText("Entrar");
- btn_entrar.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_entrarActionPerformed(evt);
- }
- });
- btn_entrar2.setFont(new java.awt.Font("Tahoma", 0, 19)); // NOI18N
- btn_entrar2.setForeground(new java.awt.Color(255, 0, 51));
- btn_entrar2.setText("Terminar");
- btn_entrar2.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- btn_entrar2ActionPerformed(evt);
- }
- });
- jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/conviviodei/dei.png"))); // NOI18N
- jLabel2.setText("jLabel2");
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGap(0, 0, Short.MAX_VALUE)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
- .addComponent(btn_entrar2, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
- .addComponent(btn_entrar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)
- .addComponent(jLabel1)
- .addGap(26, 26, 26))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(jLabel2)
- .addComponent(jLabel1))
- .addGap(30, 30, 30)
- .addComponent(btn_entrar)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(btn_entrar2)
- .addContainerGap(24, Short.MAX_VALUE))
- );
- pack();
- }// </editor-fold>
- private void btn_entrarActionPerformed(java.awt.event.ActionEvent evt) {
- new MenuInicial(convivio).setVisible(false);
- new MainMenu(convivio).setVisible(true); // TODO add your handling code here:
- }
- private void btn_entrar2ActionPerformed(java.awt.event.ActionEvent evt) {
- System.exit(0);// TODO add your handling code here:
- }
- /**
- * @param args the command line arguments
- */
- // Variables declaration - do not modify
- private javax.swing.JButton btn_entrar;
- private javax.swing.JButton btn_entrar2;
- private javax.swing.JFrame jFrame1;
- private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel jLabel2;
- // End of variables declaration
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement