<filename>Monopoly_Server/src/view/UserView.java
/*
 * 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 view;

import controller.UserViewController;
import javax.swing.JButton;
import javax.swing.JList;

/**
 *
 * @author Camilo
 */
public class UserView extends javax.swing.JFrame {

    /**
     * Creates new form UserView
     */
    public UserView() {
        initComponents();
        UserViewController.load(this);
    }

    public JList getjLUserList() {
        return jLUserList;
    }

    public JButton getjBAddUser() {
        return jBAddUser;
    }

    public JButton getjBDeleteUser() {
        return jBDeleteUser;
    }

    public JButton getjBEditUser() {
        return jBEditUser;
    }

    /**
     * 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">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPMain = new javax.swing.JPanel();
        jPCenter = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jLUserList = new javax.swing.JList();
        jPEast = new javax.swing.JPanel();
        jBAddUser = new javax.swing.JButton();
        jBEditUser = new javax.swing.JButton();
        jBDeleteUser = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);

        jPMain.setLayout(new java.awt.BorderLayout());

        jPCenter.setPreferredSize(new java.awt.Dimension(300, 300));

        jLUserList.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane1.setViewportView(jLUserList);

        javax.swing.GroupLayout jPCenterLayout = new javax.swing.GroupLayout(jPCenter);
        jPCenter.setLayout(jPCenterLayout);
        jPCenterLayout.setHorizontalGroup(
            jPCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
            .addGroup(jPCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPCenterLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        jPCenterLayout.setVerticalGroup(
            jPCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
            .addGroup(jPCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPCenterLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE)
                    .addContainerGap()))
        );

        jPMain.add(jPCenter, java.awt.BorderLayout.CENTER);

        jPEast.setBackground(new java.awt.Color(245, 245, 245));
        jPEast.setPreferredSize(new java.awt.Dimension(100, 300));

        jBAddUser.setText("jButton1");
        jBAddUser.setMaximumSize(new java.awt.Dimension(80, 30));
        jBAddUser.setMinimumSize(new java.awt.Dimension(80, 30));
        jBAddUser.setPreferredSize(new java.awt.Dimension(80, 30));
        jPEast.add(jBAddUser);

        jBEditUser.setText("jButton2");
        jBEditUser.setMaximumSize(new java.awt.Dimension(80, 30));
        jBEditUser.setMinimumSize(new java.awt.Dimension(80, 30));
        jBEditUser.setPreferredSize(new java.awt.Dimension(80, 30));
        jPEast.add(jBEditUser);

        jBDeleteUser.setText("jButton3");
        jBDeleteUser.setMaximumSize(new java.awt.Dimension(80, 30));
        jBDeleteUser.setMinimumSize(new java.awt.Dimension(80, 30));
        jBDeleteUser.setPreferredSize(new java.awt.Dimension(80, 30));
        jPEast.add(jBDeleteUser);

        jPMain.add(jPEast, java.awt.BorderLayout.EAST);

        getContentPane().add(jPMain, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(UserView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(UserView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(UserView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(UserView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new UserView().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBAddUser;
    private javax.swing.JButton jBDeleteUser;
    private javax.swing.JButton jBEditUser;
    private javax.swing.JList jLUserList;
    private javax.swing.JPanel jPCenter;
    private javax.swing.JPanel jPEast;
    private javax.swing.JPanel jPMain;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables
}
