├── .gitignore
├── README.md
├── build.xml
├── manifest.mf
├── nbproject
├── build-impl.xml
├── genfiles.properties
├── private
│ ├── config.properties
│ ├── private.properties
│ └── private.xml
├── project.properties
└── project.xml
└── src
├── images
├── Thumbs.db
├── door_out.png
├── group.png
├── group_add.png
├── group_delete.png
├── help.png
├── ico.png
├── icon.png
├── information.png
├── logo-login.png
├── mug11 (1).png
├── mug11 (2).png
├── page.png
├── printer.png
├── user.png
├── user_add.png
├── user_delete.png
├── user_edit.png
├── wrench_orange.png
└── zoom.png
└── view
├── TelaCadastroCliente.form
├── TelaCadastroCliente.java
├── TelaCadastroClienteScroll.form
├── TelaCadastroClienteScroll.java
├── TelaCadastroUsuario.form
├── TelaCadastroUsuario.java
├── TelaCadastroUsuarioSDI.form
├── TelaCadastroUsuarioSDI.java
├── TelaCardLayout.form
├── TelaCardLayout.java
├── TelaEntrada.form
├── TelaEntrada.java
├── TelaJFileChosse.form
├── TelaJFileChosse.java
├── TelaLogin.form
├── TelaLogin.java
├── TelaLoginModal.form
├── TelaLoginModal.java
├── TelaPopupMenu.form
├── TelaPopupMenu.java
├── TelaPrincipal.form
├── TelaPrincipal.java
├── TelaPrincipalMDI.form
├── TelaPrincipalMDI.java
├── TelaPrincipalSDI.form
├── TelaPrincipalSDI.java
├── TelaSlider.form
├── TelaSlider.java
├── viewJTable.form
└── viewJTable.java
/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | dist/
3 | test/
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/README.md
--------------------------------------------------------------------------------
/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Builds, tests, and runs the project InterfaceJava.
12 |
13 |
73 |
74 |
--------------------------------------------------------------------------------
/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=0841c816
2 | build.xml.script.CRC32=196ec1ee
3 | build.xml.stylesheet.CRC32=8064a381@1.68.1.46
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=0841c816
7 | nbproject/build-impl.xml.script.CRC32=70661224
8 | nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48
9 |
--------------------------------------------------------------------------------
/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/nbproject/private/config.properties
--------------------------------------------------------------------------------
/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | javac.debug=true
5 | javadoc.preview=true
6 | user.properties.file=C:\\Users\\Ronaldo\\AppData\\Roaming\\NetBeans\\8.1\\build.properties
7 |
--------------------------------------------------------------------------------
/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/C:/Users/Ronaldo/Documents/NetBeansProjects/descompila%20java/InterfaceJava/src/view/TelaPopupMenu.java
7 | file:/C:/Users/Ronaldo/Documents/NetBeansProjects/descompila%20java/InterfaceJava/src/view/TelaLogin.java
8 | file:/C:/Users/Ronaldo/Documents/NetBeansProjects/descompila%20java/InterfaceJava/src/view/TelaJFileChosse.java
9 | file:/C:/Users/Ronaldo/Documents/NetBeansProjects/descompila%20java/InterfaceJava/src/view/TelaCardLayout.java
10 | file:/C:/Users/Ronaldo/Documents/NetBeansProjects/descompila%20java/InterfaceJava/src/view/TelaLoginModal.java
11 | file:/C:/Users/Ronaldo/Documents/NetBeansProjects/descompila%20java/InterfaceJava/src/view/TelaEntrada.java
12 | file:/C:/Users/Ronaldo/Documents/NetBeansProjects/descompila%20java/InterfaceJava/src/view/TelaSlider.java
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/nbproject/project.properties:
--------------------------------------------------------------------------------
1 | annotation.processing.enabled=true
2 | annotation.processing.enabled.in.editor=false
3 | annotation.processing.processors.list=
4 | annotation.processing.run.all.processors=true
5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6 | application.title=InterfaceJava
7 | application.vendor=Samuelson
8 | build.classes.dir=${build.dir}/classes
9 | build.classes.excludes=**/*.java,**/*.form
10 | # This directory is removed when the project is cleaned:
11 | build.dir=build
12 | build.generated.dir=${build.dir}/generated
13 | build.generated.sources.dir=${build.dir}/generated-sources
14 | # Only compile against the classpath explicitly listed here:
15 | build.sysclasspath=ignore
16 | build.test.classes.dir=${build.dir}/test/classes
17 | build.test.results.dir=${build.dir}/test/results
18 | # Uncomment to specify the preferred debugger connection transport:
19 | #debug.transport=dt_socket
20 | debug.classpath=\
21 | ${run.classpath}
22 | debug.test.classpath=\
23 | ${run.test.classpath}
24 | # Os arquivos em build.classes.dir que devem ser exclu\u00eddos do jar de distribui\u00e7\u00e3o
25 | dist.archive.excludes=
26 | # This directory is removed when the project is cleaned:
27 | dist.dir=dist
28 | dist.jar=${dist.dir}/InterfaceJava.jar
29 | dist.javadoc.dir=${dist.dir}/javadoc
30 | endorsed.classpath=
31 | excludes=
32 | includes=**
33 | jar.compress=false
34 | javac.classpath=\
35 | ${libs.eclipselink.classpath}:\
36 | ${libs.beans-binding.classpath}
37 | # Space-separated list of extra javac options
38 | javac.compilerargs=
39 | javac.deprecation=false
40 | javac.processorpath=\
41 | ${javac.classpath}
42 | javac.source=1.7
43 | javac.target=1.7
44 | javac.test.classpath=\
45 | ${javac.classpath}:\
46 | ${build.classes.dir}
47 | javac.test.processorpath=\
48 | ${javac.test.classpath}
49 | javadoc.additionalparam=
50 | javadoc.author=false
51 | javadoc.encoding=${source.encoding}
52 | javadoc.noindex=false
53 | javadoc.nonavbar=false
54 | javadoc.notree=false
55 | javadoc.private=false
56 | javadoc.splitindex=true
57 | javadoc.use=true
58 | javadoc.version=false
59 | javadoc.windowtitle=
60 | main.class=view.TelaEntrada
61 | manifest.file=manifest.mf
62 | meta.inf.dir=${src.dir}/META-INF
63 | mkdist.disabled=false
64 | platform.active=default_platform
65 | run.classpath=\
66 | ${javac.classpath}:\
67 | ${build.classes.dir}
68 | # Space-separated list of JVM arguments used when running the project.
69 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
70 | # To set system properties for unit tests define test-sys-prop.name=value:
71 | run.jvmargs=
72 | run.test.classpath=\
73 | ${javac.test.classpath}:\
74 | ${build.test.classes.dir}
75 | source.encoding=UTF-8
76 | src.dir=src
77 | test.src.dir=test
78 |
--------------------------------------------------------------------------------
/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | InterfaceJava
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/images/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/Thumbs.db
--------------------------------------------------------------------------------
/src/images/door_out.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/door_out.png
--------------------------------------------------------------------------------
/src/images/group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/group.png
--------------------------------------------------------------------------------
/src/images/group_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/group_add.png
--------------------------------------------------------------------------------
/src/images/group_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/group_delete.png
--------------------------------------------------------------------------------
/src/images/help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/help.png
--------------------------------------------------------------------------------
/src/images/ico.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/ico.png
--------------------------------------------------------------------------------
/src/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/icon.png
--------------------------------------------------------------------------------
/src/images/information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/information.png
--------------------------------------------------------------------------------
/src/images/logo-login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/logo-login.png
--------------------------------------------------------------------------------
/src/images/mug11 (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/mug11 (1).png
--------------------------------------------------------------------------------
/src/images/mug11 (2).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/mug11 (2).png
--------------------------------------------------------------------------------
/src/images/page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/page.png
--------------------------------------------------------------------------------
/src/images/printer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/printer.png
--------------------------------------------------------------------------------
/src/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/user.png
--------------------------------------------------------------------------------
/src/images/user_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/user_add.png
--------------------------------------------------------------------------------
/src/images/user_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/user_delete.png
--------------------------------------------------------------------------------
/src/images/user_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/user_edit.png
--------------------------------------------------------------------------------
/src/images/wrench_orange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/wrench_orange.png
--------------------------------------------------------------------------------
/src/images/zoom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/descompila/InterfaceJava/45f18405b10e6e7429c362e2be1346fc1e5b6915/src/images/zoom.png
--------------------------------------------------------------------------------
/src/view/TelaCadastroCliente.java:
--------------------------------------------------------------------------------
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 |
7 | package view;
8 |
9 | import javax.swing.JOptionPane;
10 |
11 | /**
12 | *
13 | * @author Samuelson
14 | */
15 | public class TelaCadastroCliente extends javax.swing.JFrame {
16 |
17 | /**
18 | * Creates new form TelaCadastroCliente
19 | */
20 | public TelaCadastroCliente() {
21 | initComponents();
22 | }
23 |
24 | /**
25 | * This method is called from within the constructor to initialize the form.
26 | * WARNING: Do NOT modify this code. The content of this method is always
27 | * regenerated by the Form Editor.
28 | */
29 | @SuppressWarnings("unchecked")
30 | // //GEN-BEGIN:initComponents
31 | private void initComponents() {
32 |
33 | jPanel4 = new javax.swing.JPanel();
34 | jPanel1 = new javax.swing.JPanel();
35 | tfNome = new javax.swing.JTextField();
36 | jFormattedTextField2 = new javax.swing.JFormattedTextField();
37 | jcSexo = new javax.swing.JComboBox();
38 | jLabel1 = new javax.swing.JLabel();
39 | jLabel2 = new javax.swing.JLabel();
40 | jLabel3 = new javax.swing.JLabel();
41 | jLabel4 = new javax.swing.JLabel();
42 | jTextField1 = new javax.swing.JTextField();
43 | jPanel2 = new javax.swing.JPanel();
44 | jTextField2 = new javax.swing.JTextField();
45 | jLabel5 = new javax.swing.JLabel();
46 | jLabel6 = new javax.swing.JLabel();
47 | jLabel7 = new javax.swing.JLabel();
48 | jTextField3 = new javax.swing.JTextField();
49 | jTextField4 = new javax.swing.JTextField();
50 | jButton1 = new javax.swing.JButton();
51 |
52 | setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
53 | setTitle("Cadastro Cliente");
54 |
55 | jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Dados Pessoais"));
56 |
57 | try {
58 | jFormattedTextField2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
59 | } catch (java.text.ParseException ex) {
60 | ex.printStackTrace();
61 | }
62 |
63 | jcSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Selecione", "Masculino", "Feminino" }));
64 |
65 | jLabel1.setText("Nome");
66 |
67 | jLabel2.setText("Data");
68 |
69 | jLabel3.setText("CPF");
70 |
71 | jLabel4.setText("Sexo");
72 |
73 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
74 | jPanel1.setLayout(jPanel1Layout);
75 | jPanel1Layout.setHorizontalGroup(
76 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
77 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
78 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
79 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
80 | .addComponent(jFormattedTextField2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)
81 | .addComponent(tfNome, javax.swing.GroupLayout.Alignment.LEADING))
82 | .addComponent(jLabel1)
83 | .addComponent(jLabel3))
84 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 119, Short.MAX_VALUE)
85 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
86 | .addComponent(jLabel4)
87 | .addComponent(jLabel2)
88 | .addComponent(jcSexo, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
89 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
90 | .addGap(24, 24, 24))
91 | );
92 | jPanel1Layout.setVerticalGroup(
93 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
94 | .addGroup(jPanel1Layout.createSequentialGroup()
95 | .addGap(5, 5, 5)
96 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
97 | .addComponent(jLabel1)
98 | .addComponent(jLabel2))
99 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
100 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
101 | .addComponent(tfNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
102 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
103 | .addGap(22, 22, 22)
104 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
105 | .addComponent(jLabel3)
106 | .addComponent(jLabel4))
107 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
108 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
109 | .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
110 | .addComponent(jcSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
111 | .addContainerGap(64, Short.MAX_VALUE))
112 | );
113 |
114 | jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Contato"));
115 |
116 | jLabel5.setText("Telefone");
117 |
118 | jLabel6.setText("Celular");
119 |
120 | jLabel7.setText("Email");
121 |
122 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
123 | jPanel2.setLayout(jPanel2Layout);
124 | jPanel2Layout.setHorizontalGroup(
125 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
126 | .addGroup(jPanel2Layout.createSequentialGroup()
127 | .addContainerGap()
128 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
129 | .addGroup(jPanel2Layout.createSequentialGroup()
130 | .addComponent(jLabel5)
131 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
132 | .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE))
133 | .addGroup(jPanel2Layout.createSequentialGroup()
134 | .addComponent(jLabel6)
135 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
136 | .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE))
137 | .addGroup(jPanel2Layout.createSequentialGroup()
138 | .addComponent(jLabel7)
139 | .addGap(18, 18, 18)
140 | .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE)))
141 | .addContainerGap(250, Short.MAX_VALUE))
142 | );
143 | jPanel2Layout.setVerticalGroup(
144 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
145 | .addGroup(jPanel2Layout.createSequentialGroup()
146 | .addGap(1, 1, 1)
147 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
148 | .addComponent(jLabel5)
149 | .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
150 | .addGap(31, 31, 31)
151 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
152 | .addComponent(jLabel6)
153 | .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
154 | .addGap(31, 31, 31)
155 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
156 | .addComponent(jLabel7)
157 | .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
158 | .addContainerGap(47, Short.MAX_VALUE))
159 | );
160 |
161 | jButton1.setText("Salvar");
162 | jButton1.addActionListener(new java.awt.event.ActionListener() {
163 | public void actionPerformed(java.awt.event.ActionEvent evt) {
164 | jButton1ActionPerformed(evt);
165 | }
166 | });
167 |
168 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
169 | jPanel4.setLayout(jPanel4Layout);
170 | jPanel4Layout.setHorizontalGroup(
171 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
172 | .addGroup(jPanel4Layout.createSequentialGroup()
173 | .addContainerGap()
174 | .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
175 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
176 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
177 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
178 | .addGap(0, 0, Short.MAX_VALUE)
179 | .addComponent(jButton1)))
180 | .addContainerGap())
181 | );
182 | jPanel4Layout.setVerticalGroup(
183 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
184 | .addGroup(jPanel4Layout.createSequentialGroup()
185 | .addContainerGap()
186 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
187 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
188 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
189 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
190 | .addComponent(jButton1)
191 | .addGap(20, 20, 20))
192 | );
193 |
194 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
195 | getContentPane().setLayout(layout);
196 | layout.setHorizontalGroup(
197 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
198 | .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
199 | );
200 | layout.setVerticalGroup(
201 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
202 | .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
203 | );
204 |
205 | pack();
206 | setLocationRelativeTo(null);
207 | }// //GEN-END:initComponents
208 |
209 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
210 | // TODO add your handling code here:
211 |
212 | JOptionPane.showMessageDialog(null, "Nome:"+tfNome.getText()+" Sexo:"+jcSexo.getSelectedItem().toString());
213 |
214 |
215 | }//GEN-LAST:event_jButton1ActionPerformed
216 |
217 | /**
218 | * @param args the command line arguments
219 | */
220 | public static void main(String args[]) {
221 | /* Set the Nimbus look and feel */
222 | //
223 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
224 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
225 | */
226 | try {
227 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
228 | if ("Nimbus".equals(info.getName())) {
229 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
230 | break;
231 | }
232 | }
233 | } catch (ClassNotFoundException ex) {
234 | java.util.logging.Logger.getLogger(TelaCadastroCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
235 | } catch (InstantiationException ex) {
236 | java.util.logging.Logger.getLogger(TelaCadastroCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
237 | } catch (IllegalAccessException ex) {
238 | java.util.logging.Logger.getLogger(TelaCadastroCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
239 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
240 | java.util.logging.Logger.getLogger(TelaCadastroCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
241 | }
242 | //
243 |
244 | /* Create and display the form */
245 | java.awt.EventQueue.invokeLater(new Runnable() {
246 | public void run() {
247 | new TelaCadastroCliente().setVisible(true);
248 | }
249 | });
250 | }
251 |
252 | // Variables declaration - do not modify//GEN-BEGIN:variables
253 | private javax.swing.JButton jButton1;
254 | private javax.swing.JFormattedTextField jFormattedTextField2;
255 | private javax.swing.JLabel jLabel1;
256 | private javax.swing.JLabel jLabel2;
257 | private javax.swing.JLabel jLabel3;
258 | private javax.swing.JLabel jLabel4;
259 | private javax.swing.JLabel jLabel5;
260 | private javax.swing.JLabel jLabel6;
261 | private javax.swing.JLabel jLabel7;
262 | private javax.swing.JPanel jPanel1;
263 | private javax.swing.JPanel jPanel2;
264 | private javax.swing.JPanel jPanel4;
265 | private javax.swing.JTextField jTextField1;
266 | private javax.swing.JTextField jTextField2;
267 | private javax.swing.JTextField jTextField3;
268 | private javax.swing.JTextField jTextField4;
269 | private javax.swing.JComboBox jcSexo;
270 | private javax.swing.JTextField tfNome;
271 | // End of variables declaration//GEN-END:variables
272 | }
273 |
--------------------------------------------------------------------------------
/src/view/TelaCadastroClienteScroll.java:
--------------------------------------------------------------------------------
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 |
7 | package view;
8 |
9 | import javax.swing.JOptionPane;
10 |
11 | /**
12 | *
13 | * @author Samuelson
14 | */
15 | public class TelaCadastroClienteScroll extends javax.swing.JFrame {
16 |
17 | /**
18 | * Creates new form TelaCadastroClienteScroll
19 | */
20 | public TelaCadastroClienteScroll() {
21 | initComponents();
22 |
23 | }
24 |
25 | /**
26 | * This method is called from within the constructor to initialize the form.
27 | * WARNING: Do NOT modify this code. The content of this method is always
28 | * regenerated by the Form Editor.
29 | */
30 | @SuppressWarnings("unchecked")
31 | // //GEN-BEGIN:initComponents
32 | private void initComponents() {
33 |
34 | jScrollPane1 = new javax.swing.JScrollPane();
35 | jPanel4 = new javax.swing.JPanel();
36 | jPanel1 = new javax.swing.JPanel();
37 | tfNome = new javax.swing.JTextField();
38 | jFormattedTextField2 = new javax.swing.JFormattedTextField();
39 | jcSexo = new javax.swing.JComboBox();
40 | jLabel1 = new javax.swing.JLabel();
41 | jLabel2 = new javax.swing.JLabel();
42 | jLabel3 = new javax.swing.JLabel();
43 | jLabel4 = new javax.swing.JLabel();
44 | jTextField1 = new javax.swing.JTextField();
45 | jPanel2 = new javax.swing.JPanel();
46 | jTextField2 = new javax.swing.JTextField();
47 | jLabel5 = new javax.swing.JLabel();
48 | jLabel6 = new javax.swing.JLabel();
49 | jLabel7 = new javax.swing.JLabel();
50 | jTextField3 = new javax.swing.JTextField();
51 | jTextField4 = new javax.swing.JTextField();
52 | jButton1 = new javax.swing.JButton();
53 |
54 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
55 |
56 | jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Dados Pessoais"));
57 |
58 | try {
59 | jFormattedTextField2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
60 | } catch (java.text.ParseException ex) {
61 | ex.printStackTrace();
62 | }
63 |
64 | jcSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Selecione", "Masculino", "Feminino" }));
65 |
66 | jLabel1.setText("Nome");
67 |
68 | jLabel2.setText("Data");
69 |
70 | jLabel3.setText("CPF");
71 |
72 | jLabel4.setText("Sexo");
73 |
74 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
75 | jPanel1.setLayout(jPanel1Layout);
76 | jPanel1Layout.setHorizontalGroup(
77 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
78 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
79 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
80 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
81 | .addComponent(jFormattedTextField2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)
82 | .addComponent(tfNome, javax.swing.GroupLayout.Alignment.LEADING))
83 | .addComponent(jLabel1)
84 | .addComponent(jLabel3))
85 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 119, Short.MAX_VALUE)
86 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87 | .addComponent(jLabel4)
88 | .addComponent(jLabel2)
89 | .addComponent(jcSexo, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
90 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
91 | .addGap(24, 24, 24))
92 | );
93 | jPanel1Layout.setVerticalGroup(
94 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
95 | .addGroup(jPanel1Layout.createSequentialGroup()
96 | .addGap(5, 5, 5)
97 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
98 | .addComponent(jLabel1)
99 | .addComponent(jLabel2))
100 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
101 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
102 | .addComponent(tfNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
103 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
104 | .addGap(22, 22, 22)
105 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
106 | .addComponent(jLabel3)
107 | .addComponent(jLabel4))
108 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
109 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
110 | .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
111 | .addComponent(jcSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
112 | .addContainerGap(64, Short.MAX_VALUE))
113 | );
114 |
115 | jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Contato"));
116 |
117 | jLabel5.setText("Telefone");
118 |
119 | jLabel6.setText("Celular");
120 |
121 | jLabel7.setText("Email");
122 |
123 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
124 | jPanel2.setLayout(jPanel2Layout);
125 | jPanel2Layout.setHorizontalGroup(
126 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
127 | .addGroup(jPanel2Layout.createSequentialGroup()
128 | .addContainerGap()
129 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
130 | .addGroup(jPanel2Layout.createSequentialGroup()
131 | .addComponent(jLabel5)
132 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
133 | .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE))
134 | .addGroup(jPanel2Layout.createSequentialGroup()
135 | .addComponent(jLabel6)
136 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
137 | .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE))
138 | .addGroup(jPanel2Layout.createSequentialGroup()
139 | .addComponent(jLabel7)
140 | .addGap(18, 18, 18)
141 | .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE)))
142 | .addContainerGap(250, Short.MAX_VALUE))
143 | );
144 | jPanel2Layout.setVerticalGroup(
145 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
146 | .addGroup(jPanel2Layout.createSequentialGroup()
147 | .addGap(1, 1, 1)
148 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
149 | .addComponent(jLabel5)
150 | .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
151 | .addGap(31, 31, 31)
152 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
153 | .addComponent(jLabel6)
154 | .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
155 | .addGap(31, 31, 31)
156 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
157 | .addComponent(jLabel7)
158 | .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
159 | .addContainerGap(47, Short.MAX_VALUE))
160 | );
161 |
162 | jButton1.setText("Salvar");
163 | jButton1.addActionListener(new java.awt.event.ActionListener() {
164 | public void actionPerformed(java.awt.event.ActionEvent evt) {
165 | jButton1ActionPerformed(evt);
166 | }
167 | });
168 |
169 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
170 | jPanel4.setLayout(jPanel4Layout);
171 | jPanel4Layout.setHorizontalGroup(
172 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
173 | .addGroup(jPanel4Layout.createSequentialGroup()
174 | .addContainerGap()
175 | .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
176 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
177 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
178 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
179 | .addGap(0, 0, Short.MAX_VALUE)
180 | .addComponent(jButton1)))
181 | .addContainerGap())
182 | );
183 | jPanel4Layout.setVerticalGroup(
184 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
185 | .addGroup(jPanel4Layout.createSequentialGroup()
186 | .addContainerGap()
187 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
188 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
189 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
190 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
191 | .addComponent(jButton1)
192 | .addGap(20, 20, 20))
193 | );
194 |
195 | jScrollPane1.setViewportView(jPanel4);
196 |
197 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
198 | getContentPane().setLayout(layout);
199 | layout.setHorizontalGroup(
200 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
201 | .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 569, Short.MAX_VALUE)
202 | );
203 | layout.setVerticalGroup(
204 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
205 | .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 444, Short.MAX_VALUE)
206 | );
207 |
208 | pack();
209 | }// //GEN-END:initComponents
210 |
211 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
212 | // TODO add your handling code here:
213 |
214 | JOptionPane.showMessageDialog(null, "Nome:"+tfNome.getText()+" Sexo:"+jcSexo.getSelectedItem().toString());
215 |
216 | }//GEN-LAST:event_jButton1ActionPerformed
217 |
218 | /**
219 | * @param args the command line arguments
220 | */
221 | public static void main(String args[]) {
222 | /* Set the Nimbus look and feel */
223 | //
224 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
225 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
226 | */
227 | try {
228 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
229 | if ("Nimbus".equals(info.getName())) {
230 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
231 | break;
232 | }
233 | }
234 | } catch (ClassNotFoundException ex) {
235 | java.util.logging.Logger.getLogger(TelaCadastroClienteScroll.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
236 | } catch (InstantiationException ex) {
237 | java.util.logging.Logger.getLogger(TelaCadastroClienteScroll.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
238 | } catch (IllegalAccessException ex) {
239 | java.util.logging.Logger.getLogger(TelaCadastroClienteScroll.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
240 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
241 | java.util.logging.Logger.getLogger(TelaCadastroClienteScroll.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
242 | }
243 | //
244 |
245 | /* Create and display the form */
246 | java.awt.EventQueue.invokeLater(new Runnable() {
247 | public void run() {
248 | new TelaCadastroClienteScroll().setVisible(true);
249 | }
250 | });
251 | }
252 |
253 | // Variables declaration - do not modify//GEN-BEGIN:variables
254 | private javax.swing.JButton jButton1;
255 | private javax.swing.JFormattedTextField jFormattedTextField2;
256 | private javax.swing.JLabel jLabel1;
257 | private javax.swing.JLabel jLabel2;
258 | private javax.swing.JLabel jLabel3;
259 | private javax.swing.JLabel jLabel4;
260 | private javax.swing.JLabel jLabel5;
261 | private javax.swing.JLabel jLabel6;
262 | private javax.swing.JLabel jLabel7;
263 | private javax.swing.JPanel jPanel1;
264 | private javax.swing.JPanel jPanel2;
265 | private javax.swing.JPanel jPanel4;
266 | private javax.swing.JScrollPane jScrollPane1;
267 | private javax.swing.JTextField jTextField1;
268 | private javax.swing.JTextField jTextField2;
269 | private javax.swing.JTextField jTextField3;
270 | private javax.swing.JTextField jTextField4;
271 | private javax.swing.JComboBox jcSexo;
272 | private javax.swing.JTextField tfNome;
273 | // End of variables declaration//GEN-END:variables
274 | }
275 |
--------------------------------------------------------------------------------
/src/view/TelaCadastroUsuario.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
113 |
--------------------------------------------------------------------------------
/src/view/TelaCadastroUsuario.java:
--------------------------------------------------------------------------------
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 |
7 | package view;
8 |
9 | /**
10 | *
11 | * @author Samuelson
12 | */
13 | public class TelaCadastroUsuario extends javax.swing.JInternalFrame {
14 |
15 | /**
16 | * Creates new form TelaCadastroUsuario
17 | */
18 | public TelaCadastroUsuario() {
19 | initComponents();
20 |
21 | }
22 |
23 | /**
24 | * This method is called from within the constructor to initialize the form.
25 | * WARNING: Do NOT modify this code. The content of this method is always
26 | * regenerated by the Form Editor.
27 | */
28 | @SuppressWarnings("unchecked")
29 | // //GEN-BEGIN:initComponents
30 | private void initComponents() {
31 |
32 | jPanel1 = new javax.swing.JPanel();
33 | jLabel1 = new javax.swing.JLabel();
34 | jLabel2 = new javax.swing.JLabel();
35 | jLabel3 = new javax.swing.JLabel();
36 | jTextField1 = new javax.swing.JTextField();
37 | jPasswordField1 = new javax.swing.JPasswordField();
38 | jPasswordField2 = new javax.swing.JPasswordField();
39 | jButton1 = new javax.swing.JButton();
40 |
41 | setClosable(true);
42 | setMaximizable(true);
43 | setResizable(true);
44 | setTitle("Cadastro Usuario");
45 |
46 | jLabel1.setText("Usuario");
47 |
48 | jLabel2.setText("Senha");
49 |
50 | jLabel3.setText("Confirmar senha");
51 |
52 | jButton1.setText("Salvar");
53 |
54 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
55 | jPanel1.setLayout(jPanel1Layout);
56 | jPanel1Layout.setHorizontalGroup(
57 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
58 | .addGroup(jPanel1Layout.createSequentialGroup()
59 | .addGap(46, 46, 46)
60 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
61 | .addComponent(jButton1)
62 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
63 | .addComponent(jLabel3)
64 | .addComponent(jLabel2)
65 | .addComponent(jLabel1)
66 | .addComponent(jTextField1)
67 | .addComponent(jPasswordField1)
68 | .addComponent(jPasswordField2, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE)))
69 | .addContainerGap(46, Short.MAX_VALUE))
70 | );
71 | jPanel1Layout.setVerticalGroup(
72 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
73 | .addGroup(jPanel1Layout.createSequentialGroup()
74 | .addGap(80, 80, 80)
75 | .addComponent(jLabel1)
76 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
77 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
78 | .addGap(24, 24, 24)
79 | .addComponent(jLabel2)
80 | .addGap(7, 7, 7)
81 | .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
82 | .addGap(18, 18, 18)
83 | .addComponent(jLabel3)
84 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
85 | .addComponent(jPasswordField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
86 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)
87 | .addComponent(jButton1)
88 | .addGap(24, 24, 24))
89 | );
90 |
91 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
92 | getContentPane().setLayout(layout);
93 | layout.setHorizontalGroup(
94 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
95 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
96 | );
97 | layout.setVerticalGroup(
98 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
99 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
100 | );
101 |
102 | pack();
103 | }// //GEN-END:initComponents
104 |
105 |
106 | // Variables declaration - do not modify//GEN-BEGIN:variables
107 | private javax.swing.JButton jButton1;
108 | private javax.swing.JLabel jLabel1;
109 | private javax.swing.JLabel jLabel2;
110 | private javax.swing.JLabel jLabel3;
111 | private javax.swing.JPanel jPanel1;
112 | private javax.swing.JPasswordField jPasswordField1;
113 | private javax.swing.JPasswordField jPasswordField2;
114 | private javax.swing.JTextField jTextField1;
115 | // End of variables declaration//GEN-END:variables
116 | }
117 |
--------------------------------------------------------------------------------
/src/view/TelaCadastroUsuarioSDI.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
111 |
--------------------------------------------------------------------------------
/src/view/TelaCadastroUsuarioSDI.java:
--------------------------------------------------------------------------------
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 |
7 | package view;
8 |
9 | /**
10 | *
11 | * @author Samuelson
12 | */
13 | public class TelaCadastroUsuarioSDI extends javax.swing.JFrame {
14 |
15 | /**
16 | * Creates new form TelaCadastroUsuarioSDI
17 | */
18 | public TelaCadastroUsuarioSDI() {
19 | initComponents();
20 | }
21 |
22 | /**
23 | * This method is called from within the constructor to initialize the form.
24 | * WARNING: Do NOT modify this code. The content of this method is always
25 | * regenerated by the Form Editor.
26 | */
27 | @SuppressWarnings("unchecked")
28 | // //GEN-BEGIN:initComponents
29 | private void initComponents() {
30 |
31 | jPanel1 = new javax.swing.JPanel();
32 | jLabel1 = new javax.swing.JLabel();
33 | jLabel2 = new javax.swing.JLabel();
34 | jLabel3 = new javax.swing.JLabel();
35 | jTextField1 = new javax.swing.JTextField();
36 | jPasswordField1 = new javax.swing.JPasswordField();
37 | jPasswordField2 = new javax.swing.JPasswordField();
38 | jButton1 = new javax.swing.JButton();
39 |
40 | setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
41 |
42 | jLabel1.setText("Usuario");
43 |
44 | jLabel2.setText("Senha");
45 |
46 | jLabel3.setText("Confirmar senha");
47 |
48 | jButton1.setText("Salvar");
49 |
50 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
51 | jPanel1.setLayout(jPanel1Layout);
52 | jPanel1Layout.setHorizontalGroup(
53 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
54 | .addGroup(jPanel1Layout.createSequentialGroup()
55 | .addGap(46, 46, 46)
56 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
57 | .addComponent(jButton1)
58 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
59 | .addComponent(jLabel3)
60 | .addComponent(jLabel2)
61 | .addComponent(jLabel1)
62 | .addComponent(jTextField1)
63 | .addComponent(jPasswordField1)
64 | .addComponent(jPasswordField2, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE)))
65 | .addContainerGap(40, Short.MAX_VALUE))
66 | );
67 | jPanel1Layout.setVerticalGroup(
68 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
69 | .addGroup(jPanel1Layout.createSequentialGroup()
70 | .addGap(80, 80, 80)
71 | .addComponent(jLabel1)
72 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
73 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
74 | .addGap(24, 24, 24)
75 | .addComponent(jLabel2)
76 | .addGap(7, 7, 7)
77 | .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
78 | .addGap(18, 18, 18)
79 | .addComponent(jLabel3)
80 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
81 | .addComponent(jPasswordField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
82 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
83 | .addComponent(jButton1)
84 | .addGap(24, 24, 24))
85 | );
86 |
87 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
88 | getContentPane().setLayout(layout);
89 | layout.setHorizontalGroup(
90 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
91 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
92 | );
93 | layout.setVerticalGroup(
94 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
95 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
96 | );
97 |
98 | pack();
99 | }// //GEN-END:initComponents
100 |
101 | /**
102 | * @param args the command line arguments
103 | */
104 | public static void main(String args[]) {
105 | /* Set the Nimbus look and feel */
106 | //
107 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
108 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
109 | */
110 | try {
111 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
112 | if ("Nimbus".equals(info.getName())) {
113 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
114 | break;
115 | }
116 | }
117 | } catch (ClassNotFoundException ex) {
118 | java.util.logging.Logger.getLogger(TelaCadastroUsuarioSDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
119 | } catch (InstantiationException ex) {
120 | java.util.logging.Logger.getLogger(TelaCadastroUsuarioSDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
121 | } catch (IllegalAccessException ex) {
122 | java.util.logging.Logger.getLogger(TelaCadastroUsuarioSDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
123 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
124 | java.util.logging.Logger.getLogger(TelaCadastroUsuarioSDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
125 | }
126 | //
127 |
128 | /* Create and display the form */
129 | java.awt.EventQueue.invokeLater(new Runnable() {
130 | public void run() {
131 | new TelaCadastroUsuarioSDI().setVisible(true);
132 | }
133 | });
134 | }
135 |
136 | // Variables declaration - do not modify//GEN-BEGIN:variables
137 | private javax.swing.JButton jButton1;
138 | private javax.swing.JLabel jLabel1;
139 | private javax.swing.JLabel jLabel2;
140 | private javax.swing.JLabel jLabel3;
141 | private javax.swing.JPanel jPanel1;
142 | private javax.swing.JPasswordField jPasswordField1;
143 | private javax.swing.JPasswordField jPasswordField2;
144 | private javax.swing.JTextField jTextField1;
145 | // End of variables declaration//GEN-END:variables
146 | }
147 |
--------------------------------------------------------------------------------
/src/view/TelaCardLayout.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
125 |
--------------------------------------------------------------------------------
/src/view/TelaCardLayout.java:
--------------------------------------------------------------------------------
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 |
7 | package view;
8 |
9 | import java.awt.CardLayout;
10 |
11 | /**
12 | *
13 | * @author Samuelson
14 | */
15 | public class TelaCardLayout extends javax.swing.JFrame {
16 |
17 | /**
18 | * Creates new form TelaCardLayout
19 | */
20 | public TelaCardLayout() {
21 | initComponents();
22 | }
23 |
24 | /**
25 | * This method is called from within the constructor to initialize the form.
26 | * WARNING: Do NOT modify this code. The content of this method is always
27 | * regenerated by the Form Editor.
28 | */
29 | @SuppressWarnings("unchecked")
30 | // //GEN-BEGIN:initComponents
31 | private void initComponents() {
32 |
33 | jPanel1 = new javax.swing.JPanel();
34 | jPanel2 = new javax.swing.JPanel();
35 | jPanel3 = new javax.swing.JPanel();
36 | jMenuBar1 = new javax.swing.JMenuBar();
37 | jMenu1 = new javax.swing.JMenu();
38 | jMenuItem2 = new javax.swing.JMenuItem();
39 | jMenuItem1 = new javax.swing.JMenuItem();
40 |
41 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
42 | setTitle("CardLayout");
43 |
44 | jPanel1.setLayout(new java.awt.CardLayout());
45 |
46 | jPanel2.setBackground(new java.awt.Color(255, 102, 204));
47 |
48 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
49 | jPanel2.setLayout(jPanel2Layout);
50 | jPanel2Layout.setHorizontalGroup(
51 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
52 | .addGap(0, 583, Short.MAX_VALUE)
53 | );
54 | jPanel2Layout.setVerticalGroup(
55 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
56 | .addGap(0, 371, Short.MAX_VALUE)
57 | );
58 |
59 | jPanel1.add(jPanel2, "tela1");
60 |
61 | jPanel3.setBackground(new java.awt.Color(102, 102, 255));
62 |
63 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
64 | jPanel3.setLayout(jPanel3Layout);
65 | jPanel3Layout.setHorizontalGroup(
66 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
67 | .addGap(0, 583, Short.MAX_VALUE)
68 | );
69 | jPanel3Layout.setVerticalGroup(
70 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
71 | .addGap(0, 371, Short.MAX_VALUE)
72 | );
73 |
74 | jPanel1.add(jPanel3, "tela2");
75 |
76 | jMenu1.setText("Telas");
77 |
78 | jMenuItem2.setText("Outubro Rosa");
79 | jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
80 | public void actionPerformed(java.awt.event.ActionEvent evt) {
81 | jMenuItem2ActionPerformed(evt);
82 | }
83 | });
84 | jMenu1.add(jMenuItem2);
85 |
86 | jMenuItem1.setText("Novembro Azul");
87 | jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
88 | public void actionPerformed(java.awt.event.ActionEvent evt) {
89 | jMenuItem1ActionPerformed(evt);
90 | }
91 | });
92 | jMenu1.add(jMenuItem1);
93 |
94 | jMenuBar1.add(jMenu1);
95 |
96 | setJMenuBar(jMenuBar1);
97 |
98 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
99 | getContentPane().setLayout(layout);
100 | layout.setHorizontalGroup(
101 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
102 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
103 | );
104 | layout.setVerticalGroup(
105 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
106 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
107 | );
108 |
109 | pack();
110 | setLocationRelativeTo(null);
111 | }// //GEN-END:initComponents
112 |
113 | private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
114 | // TODO add your handling code here:
115 |
116 | CardLayout cl = (CardLayout) jPanel1.getLayout();
117 | cl.show(jPanel1, "tela1");
118 |
119 | }//GEN-LAST:event_jMenuItem2ActionPerformed
120 |
121 | private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
122 | // TODO add your handling code here:
123 | CardLayout cl = (CardLayout) jPanel1.getLayout();
124 | cl.show(jPanel1, "tela2");
125 |
126 | }//GEN-LAST:event_jMenuItem1ActionPerformed
127 |
128 | /**
129 | * @param args the command line arguments
130 | */
131 | public static void main(String args[]) {
132 | /* Set the Nimbus look and feel */
133 | //
134 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
135 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
136 | */
137 | try {
138 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
139 | if ("Nimbus".equals(info.getName())) {
140 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
141 | break;
142 | }
143 | }
144 | } catch (ClassNotFoundException ex) {
145 | java.util.logging.Logger.getLogger(TelaCardLayout.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
146 | } catch (InstantiationException ex) {
147 | java.util.logging.Logger.getLogger(TelaCardLayout.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
148 | } catch (IllegalAccessException ex) {
149 | java.util.logging.Logger.getLogger(TelaCardLayout.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
150 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
151 | java.util.logging.Logger.getLogger(TelaCardLayout.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
152 | }
153 | //
154 |
155 | /* Create and display the form */
156 | java.awt.EventQueue.invokeLater(new Runnable() {
157 | public void run() {
158 | new TelaCardLayout().setVisible(true);
159 | }
160 | });
161 | }
162 |
163 | // Variables declaration - do not modify//GEN-BEGIN:variables
164 | private javax.swing.JMenu jMenu1;
165 | private javax.swing.JMenuBar jMenuBar1;
166 | private javax.swing.JMenuItem jMenuItem1;
167 | private javax.swing.JMenuItem jMenuItem2;
168 | private javax.swing.JPanel jPanel1;
169 | private javax.swing.JPanel jPanel2;
170 | private javax.swing.JPanel jPanel3;
171 | // End of variables declaration//GEN-END:variables
172 | }
173 |
--------------------------------------------------------------------------------
/src/view/TelaEntrada.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
67 |
--------------------------------------------------------------------------------
/src/view/TelaEntrada.java:
--------------------------------------------------------------------------------
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 view;
7 |
8 | /**
9 | *
10 | * @author Samuelson
11 | */
12 | public class TelaEntrada extends javax.swing.JFrame {
13 |
14 | /**
15 | * Creates new form TelaEntrada
16 | */
17 | public TelaEntrada() {
18 | initComponents();
19 |
20 | TelaLoginModal tlm = new TelaLoginModal(this, true);
21 | tlm.setVisible(true);
22 |
23 | bemVindo.setText("Bem vindo: " + tlm.login);
24 |
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 | // //GEN-BEGIN:initComponents
34 | private void initComponents() {
35 |
36 | bemVindo = new javax.swing.JLabel();
37 | jButton1 = new javax.swing.JButton();
38 |
39 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
40 | setTitle("Tela Entrada");
41 | setBackground(new java.awt.Color(255, 255, 255));
42 |
43 | jButton1.setText("Login");
44 | jButton1.addActionListener(new java.awt.event.ActionListener() {
45 | public void actionPerformed(java.awt.event.ActionEvent evt) {
46 | jButton1ActionPerformed(evt);
47 | }
48 | });
49 |
50 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
51 | getContentPane().setLayout(layout);
52 | layout.setHorizontalGroup(
53 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
54 | .addGroup(layout.createSequentialGroup()
55 | .addContainerGap(130, Short.MAX_VALUE)
56 | .addComponent(bemVindo, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE)
57 | .addContainerGap(109, Short.MAX_VALUE))
58 | .addGroup(layout.createSequentialGroup()
59 | .addGap(251, 251, 251)
60 | .addComponent(jButton1)
61 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
62 | );
63 | layout.setVerticalGroup(
64 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
65 | .addGroup(layout.createSequentialGroup()
66 | .addGap(36, 36, 36)
67 | .addComponent(bemVindo, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
68 | .addGap(95, 95, 95)
69 | .addComponent(jButton1)
70 | .addContainerGap(187, Short.MAX_VALUE))
71 | );
72 |
73 | pack();
74 | setLocationRelativeTo(null);
75 | }// //GEN-END:initComponents
76 |
77 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
78 | // TODO add your handling code here:
79 | TelaLoginModal tlm = new TelaLoginModal(this,true);
80 | tlm.setVisible(true);
81 |
82 | bemVindo.setText("Bem Vindo: " + tlm.login);
83 |
84 |
85 | }//GEN-LAST:event_jButton1ActionPerformed
86 |
87 | /**
88 | * @param args the command line arguments
89 | */
90 | public static void main(String args[]) {
91 | /* Set the Nimbus look and feel */
92 | //
93 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
94 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
95 | */
96 | try {
97 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
98 | if ("Nimbus".equals(info.getName())) {
99 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
100 | break;
101 | }
102 | }
103 | } catch (ClassNotFoundException ex) {
104 | java.util.logging.Logger.getLogger(TelaEntrada.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
105 | } catch (InstantiationException ex) {
106 | java.util.logging.Logger.getLogger(TelaEntrada.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
107 | } catch (IllegalAccessException ex) {
108 | java.util.logging.Logger.getLogger(TelaEntrada.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
109 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
110 | java.util.logging.Logger.getLogger(TelaEntrada.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
111 | }
112 | //
113 |
114 | /* Create and display the form */
115 | java.awt.EventQueue.invokeLater(new Runnable() {
116 | public void run() {
117 | new TelaEntrada().setVisible(true);
118 | }
119 | });
120 | }
121 |
122 | // Variables declaration - do not modify//GEN-BEGIN:variables
123 | private javax.swing.JLabel bemVindo;
124 | private javax.swing.JButton jButton1;
125 | // End of variables declaration//GEN-END:variables
126 | }
127 |
--------------------------------------------------------------------------------
/src/view/TelaJFileChosse.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
74 |
--------------------------------------------------------------------------------
/src/view/TelaJFileChosse.java:
--------------------------------------------------------------------------------
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 view;
7 |
8 | import java.io.File;
9 | import javax.swing.ImageIcon;
10 | import javax.swing.JFileChooser;
11 | import javax.swing.filechooser.FileNameExtensionFilter;
12 |
13 | /**
14 | *
15 | * @author Samuelson
16 | */
17 | public class TelaJFileChosse extends javax.swing.JFrame {
18 |
19 | /**
20 | * Creates new form TelaJFileChosse
21 | */
22 | public TelaJFileChosse() {
23 | initComponents();
24 | }
25 |
26 | /**
27 | * 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.
28 | */
29 | @SuppressWarnings("unchecked")
30 | // //GEN-BEGIN:initComponents
31 | private void initComponents() {
32 |
33 | txtFile = new javax.swing.JTextField();
34 | btnArquivo = new javax.swing.JButton();
35 | lbImagem = new javax.swing.JLabel();
36 |
37 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
38 | setTitle("JFileChosse");
39 | setResizable(false);
40 |
41 | btnArquivo.setText("Arquivo");
42 | btnArquivo.addActionListener(new java.awt.event.ActionListener() {
43 | public void actionPerformed(java.awt.event.ActionEvent evt) {
44 | btnArquivoActionPerformed(evt);
45 | }
46 | });
47 |
48 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
49 | getContentPane().setLayout(layout);
50 | layout.setHorizontalGroup(
51 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
52 | .addGroup(layout.createSequentialGroup()
53 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
54 | .addGroup(layout.createSequentialGroup()
55 | .addGap(46, 46, 46)
56 | .addComponent(txtFile, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
57 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
58 | .addComponent(btnArquivo))
59 | .addGroup(layout.createSequentialGroup()
60 | .addGap(92, 92, 92)
61 | .addComponent(lbImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))
62 | .addContainerGap(74, Short.MAX_VALUE))
63 | );
64 | layout.setVerticalGroup(
65 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
66 | .addGroup(layout.createSequentialGroup()
67 | .addGap(128, 128, 128)
68 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
69 | .addComponent(txtFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
70 | .addComponent(btnArquivo))
71 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
72 | .addComponent(lbImagem, javax.swing.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE))
73 | );
74 |
75 | pack();
76 | setLocationRelativeTo(null);
77 | }// //GEN-END:initComponents
78 |
79 | private void btnArquivoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnArquivoActionPerformed
80 | // TODO add your handling code here:
81 |
82 | JFileChooser fileChooser = new JFileChooser();
83 | fileChooser.setDialogTitle("Procurar arquivo");
84 | fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
85 |
86 | FileNameExtensionFilter filter = new FileNameExtensionFilter("Imagem", "jpg","png");
87 |
88 | fileChooser.setFileFilter(filter);
89 | int retorno = fileChooser.showOpenDialog(this);
90 |
91 | if(retorno == JFileChooser.APPROVE_OPTION){
92 |
93 | File file = fileChooser.getSelectedFile();
94 | txtFile.setText(file.getPath());
95 | lbImagem.setIcon(new ImageIcon(file.getPath()));
96 |
97 |
98 | }
99 |
100 |
101 |
102 | }//GEN-LAST:event_btnArquivoActionPerformed
103 |
104 | /**
105 | * @param args the command line arguments
106 | */
107 | public static void main(String args[]) {
108 | /* Set the Nimbus look and feel */
109 | //
110 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
111 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
112 | */
113 | try {
114 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
115 | if ("Nimbus".equals(info.getName())) {
116 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
117 | break;
118 | }
119 | }
120 | } catch (ClassNotFoundException ex) {
121 | java.util.logging.Logger.getLogger(TelaJFileChosse.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
122 | } catch (InstantiationException ex) {
123 | java.util.logging.Logger.getLogger(TelaJFileChosse.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
124 | } catch (IllegalAccessException ex) {
125 | java.util.logging.Logger.getLogger(TelaJFileChosse.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
126 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
127 | java.util.logging.Logger.getLogger(TelaJFileChosse.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
128 | }
129 | //
130 |
131 | /* Create and display the form */
132 | java.awt.EventQueue.invokeLater(new Runnable() {
133 | public void run() {
134 | new TelaJFileChosse().setVisible(true);
135 | }
136 | });
137 | }
138 |
139 | // Variables declaration - do not modify//GEN-BEGIN:variables
140 | private javax.swing.JButton btnArquivo;
141 | private javax.swing.JLabel lbImagem;
142 | private javax.swing.JTextField txtFile;
143 | // End of variables declaration//GEN-END:variables
144 | }
145 |
--------------------------------------------------------------------------------
/src/view/TelaLogin.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
124 |
--------------------------------------------------------------------------------
/src/view/TelaLogin.java:
--------------------------------------------------------------------------------
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 view;
7 |
8 | import java.awt.event.KeyEvent;
9 | import javax.swing.JOptionPane;
10 |
11 | /**
12 | *
13 | * @author Samuelson
14 | */
15 | public class TelaLogin extends javax.swing.JFrame {
16 |
17 | /**
18 | * Creates new form TelaLogin
19 | */
20 | public TelaLogin() {
21 | initComponents();
22 | }
23 |
24 | /**
25 | * This method is called from within the constructor to initialize the form.
26 | * WARNING: Do NOT modify this code. The content of this method is always
27 | * regenerated by the Form Editor.
28 | */
29 | @SuppressWarnings("unchecked")
30 | // //GEN-BEGIN:initComponents
31 | private void initComponents() {
32 |
33 | jPanel1 = new javax.swing.JPanel();
34 | jLabel1 = new javax.swing.JLabel();
35 | txtLogin = new javax.swing.JTextField();
36 | jLabel2 = new javax.swing.JLabel();
37 | txtSenha = new javax.swing.JPasswordField();
38 | jButton1 = new javax.swing.JButton();
39 | jLabel3 = new javax.swing.JLabel();
40 |
41 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
42 | setTitle("Acesso");
43 | setResizable(false);
44 |
45 | jLabel1.setText("Login");
46 |
47 | jLabel2.setText("Senha");
48 |
49 | txtSenha.addKeyListener(new java.awt.event.KeyAdapter() {
50 | public void keyPressed(java.awt.event.KeyEvent evt) {
51 | txtSenhaKeyPressed(evt);
52 | }
53 | });
54 |
55 | jButton1.setText("Entrar");
56 | jButton1.addActionListener(new java.awt.event.ActionListener() {
57 | public void actionPerformed(java.awt.event.ActionEvent evt) {
58 | jButton1ActionPerformed(evt);
59 | }
60 | });
61 |
62 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
63 | jPanel1.setLayout(jPanel1Layout);
64 | jPanel1Layout.setHorizontalGroup(
65 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
66 | .addGroup(jPanel1Layout.createSequentialGroup()
67 | .addGap(66, 66, 66)
68 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
69 | .addComponent(jButton1)
70 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
71 | .addComponent(jLabel2)
72 | .addComponent(jLabel1)
73 | .addComponent(txtLogin)
74 | .addComponent(txtSenha, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)))
75 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
76 | );
77 | jPanel1Layout.setVerticalGroup(
78 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
79 | .addGroup(jPanel1Layout.createSequentialGroup()
80 | .addGap(24, 24, 24)
81 | .addComponent(jLabel1)
82 | .addGap(4, 4, 4)
83 | .addComponent(txtLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
84 | .addGap(18, 18, 18)
85 | .addComponent(jLabel2)
86 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
87 | .addComponent(txtSenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
88 | .addGap(18, 18, 18)
89 | .addComponent(jButton1)
90 | .addContainerGap(21, Short.MAX_VALUE))
91 | );
92 |
93 | jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/mug11 (2).png"))); // NOI18N
94 |
95 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
96 | getContentPane().setLayout(layout);
97 | layout.setHorizontalGroup(
98 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
99 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
100 | .addGroup(layout.createSequentialGroup()
101 | .addGap(175, 175, 175)
102 | .addComponent(jLabel3)
103 | .addContainerGap(169, Short.MAX_VALUE))
104 | );
105 | layout.setVerticalGroup(
106 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
107 | .addGroup(layout.createSequentialGroup()
108 | .addGap(37, 37, 37)
109 | .addComponent(jLabel3)
110 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
111 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
112 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
113 | );
114 |
115 | pack();
116 | setLocationRelativeTo(null);
117 | }// //GEN-END:initComponents
118 |
119 | public boolean checkLogin(String login, String senha) {
120 | return login.equals("usuario") && senha.equals("123");
121 | }
122 |
123 |
124 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
125 |
126 | if (this.checkLogin(txtLogin.getText(), new String(txtSenha.getPassword()))) {
127 | JOptionPane.showMessageDialog(null, "Bem vindo!");
128 | } else {
129 | JOptionPane.showMessageDialog(null, "Dados invalidos!");
130 | }
131 |
132 |
133 | }//GEN-LAST:event_jButton1ActionPerformed
134 |
135 | private void txtSenhaKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSenhaKeyPressed
136 | // TODO add your handling code here:
137 |
138 | if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
139 | if (this.checkLogin(txtLogin.getText(), new String(txtSenha.getPassword()))) {
140 | JOptionPane.showMessageDialog(null, "Bem vindo!");
141 | } else {
142 | JOptionPane.showMessageDialog(null, "Dados invalidos!");
143 | }
144 | }
145 |
146 | }//GEN-LAST:event_txtSenhaKeyPressed
147 |
148 | /**
149 | * @param args the command line arguments
150 | */
151 | public static void main(String args[]) {
152 | /* Set the Nimbus look and feel */
153 | //
154 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
155 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
156 | */
157 | try {
158 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
159 | if ("Nimbus".equals(info.getName())) {
160 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
161 | break;
162 | }
163 | }
164 | } catch (ClassNotFoundException ex) {
165 | java.util.logging.Logger.getLogger(TelaLogin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
166 | } catch (InstantiationException ex) {
167 | java.util.logging.Logger.getLogger(TelaLogin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
168 | } catch (IllegalAccessException ex) {
169 | java.util.logging.Logger.getLogger(TelaLogin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
170 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
171 | java.util.logging.Logger.getLogger(TelaLogin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
172 | }
173 | //
174 |
175 | /* Create and display the form */
176 | java.awt.EventQueue.invokeLater(new Runnable() {
177 | public void run() {
178 | new TelaLogin().setVisible(true);
179 | }
180 | });
181 | }
182 |
183 | // Variables declaration - do not modify//GEN-BEGIN:variables
184 | private javax.swing.JButton jButton1;
185 | private javax.swing.JLabel jLabel1;
186 | private javax.swing.JLabel jLabel2;
187 | private javax.swing.JLabel jLabel3;
188 | private javax.swing.JPanel jPanel1;
189 | private javax.swing.JTextField txtLogin;
190 | private javax.swing.JPasswordField txtSenha;
191 | // End of variables declaration//GEN-END:variables
192 | }
193 |
--------------------------------------------------------------------------------
/src/view/TelaLoginModal.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
118 |
--------------------------------------------------------------------------------
/src/view/TelaLoginModal.java:
--------------------------------------------------------------------------------
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 |
7 | package view;
8 |
9 | import javax.swing.JOptionPane;
10 |
11 | /**
12 | *
13 | * @author Samuelson
14 | */
15 | public class TelaLoginModal extends javax.swing.JDialog {
16 |
17 | /**
18 | * Creates new form TelaLoginModal
19 | */
20 |
21 |
22 | public String login;
23 | public String senha;
24 |
25 |
26 | public TelaLoginModal(java.awt.Frame parent, boolean modal) {
27 | super(parent, modal);
28 | initComponents();
29 | this.setDefaultCloseOperation(0);
30 | }
31 |
32 | /**
33 | * This method is called from within the constructor to initialize the form.
34 | * WARNING: Do NOT modify this code. The content of this method is always
35 | * regenerated by the Form Editor.
36 | */
37 | @SuppressWarnings("unchecked")
38 | // //GEN-BEGIN:initComponents
39 | private void initComponents() {
40 |
41 | jPanel1 = new javax.swing.JPanel();
42 | jLabel1 = new javax.swing.JLabel();
43 | jLabel2 = new javax.swing.JLabel();
44 | txtLogin = new javax.swing.JTextField();
45 | txtSenha = new javax.swing.JPasswordField();
46 | jButton1 = new javax.swing.JButton();
47 | jButton2 = new javax.swing.JButton();
48 |
49 | setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
50 | setTitle("Login");
51 |
52 | jLabel1.setText("Login");
53 |
54 | jLabel2.setText("Senha");
55 |
56 | txtLogin.addActionListener(new java.awt.event.ActionListener() {
57 | public void actionPerformed(java.awt.event.ActionEvent evt) {
58 | txtLoginActionPerformed(evt);
59 | }
60 | });
61 |
62 | jButton1.setText("Entrar");
63 | jButton1.addActionListener(new java.awt.event.ActionListener() {
64 | public void actionPerformed(java.awt.event.ActionEvent evt) {
65 | jButton1ActionPerformed(evt);
66 | }
67 | });
68 |
69 | jButton2.setText("Sair");
70 | jButton2.addActionListener(new java.awt.event.ActionListener() {
71 | public void actionPerformed(java.awt.event.ActionEvent evt) {
72 | jButton2ActionPerformed(evt);
73 | }
74 | });
75 |
76 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
77 | jPanel1.setLayout(jPanel1Layout);
78 | jPanel1Layout.setHorizontalGroup(
79 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
80 | .addGroup(jPanel1Layout.createSequentialGroup()
81 | .addGap(85, 85, 85)
82 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
83 | .addGroup(jPanel1Layout.createSequentialGroup()
84 | .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
85 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
86 | .addComponent(jButton1))
87 | .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)
88 | .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING)
89 | .addComponent(txtLogin, javax.swing.GroupLayout.Alignment.LEADING)
90 | .addComponent(txtSenha, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE))
91 | .addContainerGap(69, Short.MAX_VALUE))
92 | );
93 | jPanel1Layout.setVerticalGroup(
94 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
95 | .addGroup(jPanel1Layout.createSequentialGroup()
96 | .addGap(111, 111, 111)
97 | .addComponent(jLabel1)
98 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
99 | .addComponent(txtLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
100 | .addGap(21, 21, 21)
101 | .addComponent(jLabel2)
102 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
103 | .addComponent(txtSenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
104 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE)
105 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
106 | .addComponent(jButton1)
107 | .addComponent(jButton2))
108 | .addGap(22, 22, 22))
109 | );
110 |
111 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
112 | getContentPane().setLayout(layout);
113 | layout.setHorizontalGroup(
114 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
115 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
116 | );
117 | layout.setVerticalGroup(
118 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
119 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
120 | );
121 |
122 | pack();
123 | setLocationRelativeTo(null);
124 | }// //GEN-END:initComponents
125 |
126 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
127 | // TODO add your handling code here:
128 |
129 | if(txtLogin.getText().equals("maria")&&txtSenha.getText().equals("123")){
130 |
131 | login = txtLogin.getText();
132 | senha = txtSenha.getText();
133 |
134 | this.dispose();
135 |
136 | }else{
137 | JOptionPane.showMessageDialog(null, "Dados informados estão incorretos.");
138 | }
139 |
140 |
141 | }//GEN-LAST:event_jButton1ActionPerformed
142 |
143 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
144 | // TODO add your handling code here:
145 |
146 | System.exit(0);
147 |
148 | }//GEN-LAST:event_jButton2ActionPerformed
149 |
150 | private void txtLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtLoginActionPerformed
151 | // TODO add your handling code here:
152 | }//GEN-LAST:event_txtLoginActionPerformed
153 |
154 | /**
155 | * @param args the command line arguments
156 | */
157 | public static void main(String args[]) {
158 | /* Set the Nimbus look and feel */
159 | //
160 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
161 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
162 | */
163 | try {
164 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
165 | if ("Nimbus".equals(info.getName())) {
166 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
167 | break;
168 | }
169 | }
170 | } catch (ClassNotFoundException ex) {
171 | java.util.logging.Logger.getLogger(TelaLoginModal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
172 | } catch (InstantiationException ex) {
173 | java.util.logging.Logger.getLogger(TelaLoginModal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
174 | } catch (IllegalAccessException ex) {
175 | java.util.logging.Logger.getLogger(TelaLoginModal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
176 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
177 | java.util.logging.Logger.getLogger(TelaLoginModal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
178 | }
179 | //
180 |
181 | /* Create and display the dialog */
182 | java.awt.EventQueue.invokeLater(new Runnable() {
183 | public void run() {
184 | TelaLoginModal dialog = new TelaLoginModal(new javax.swing.JFrame(), true);
185 | dialog.addWindowListener(new java.awt.event.WindowAdapter() {
186 | @Override
187 | public void windowClosing(java.awt.event.WindowEvent e) {
188 | System.exit(0);
189 | }
190 | });
191 | dialog.setVisible(true);
192 | }
193 | });
194 | }
195 |
196 | // Variables declaration - do not modify//GEN-BEGIN:variables
197 | private javax.swing.JButton jButton1;
198 | private javax.swing.JButton jButton2;
199 | private javax.swing.JLabel jLabel1;
200 | private javax.swing.JLabel jLabel2;
201 | private javax.swing.JPanel jPanel1;
202 | private javax.swing.JTextField txtLogin;
203 | private javax.swing.JPasswordField txtSenha;
204 | // End of variables declaration//GEN-END:variables
205 | }
206 |
--------------------------------------------------------------------------------
/src/view/TelaPopupMenu.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
65 |
--------------------------------------------------------------------------------
/src/view/TelaPopupMenu.java:
--------------------------------------------------------------------------------
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 |
7 | package view;
8 |
9 | /**
10 | *
11 | * @author Samuelson
12 | */
13 | public class TelaPopupMenu extends javax.swing.JFrame {
14 |
15 | /**
16 | * Creates new form TelaPopupMenu
17 | */
18 | public TelaPopupMenu() {
19 | initComponents();
20 | }
21 |
22 | /**
23 | * This method is called from within the constructor to initialize the form.
24 | * WARNING: Do NOT modify this code. The content of this method is always
25 | * regenerated by the Form Editor.
26 | */
27 | @SuppressWarnings("unchecked")
28 | // //GEN-BEGIN:initComponents
29 | private void initComponents() {
30 |
31 | jPopupMenu1 = new javax.swing.JPopupMenu();
32 | jMenuItem1 = new javax.swing.JMenuItem();
33 | jMenuItem2 = new javax.swing.JMenuItem();
34 | jMenuItem3 = new javax.swing.JMenuItem();
35 |
36 | jMenuItem1.setText("jMenuItem1");
37 | jPopupMenu1.add(jMenuItem1);
38 |
39 | jMenuItem2.setText("jMenuItem2");
40 | jPopupMenu1.add(jMenuItem2);
41 |
42 | jMenuItem3.setText("jMenuItem3");
43 | jPopupMenu1.add(jMenuItem3);
44 |
45 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
46 | setTitle("PopupMenu");
47 | addMouseListener(new java.awt.event.MouseAdapter() {
48 | public void mouseReleased(java.awt.event.MouseEvent evt) {
49 | formMouseReleased(evt);
50 | }
51 | });
52 |
53 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
54 | getContentPane().setLayout(layout);
55 | layout.setHorizontalGroup(
56 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
57 | .addGap(0, 482, Short.MAX_VALUE)
58 | );
59 | layout.setVerticalGroup(
60 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
61 | .addGap(0, 342, Short.MAX_VALUE)
62 | );
63 |
64 | pack();
65 | setLocationRelativeTo(null);
66 | }// //GEN-END:initComponents
67 |
68 | private void formMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseReleased
69 | // TODO add your handling code here:
70 |
71 | if(evt.isPopupTrigger()){
72 | jPopupMenu1.show(this, evt.getX(), evt.getY());
73 | }
74 |
75 | }//GEN-LAST:event_formMouseReleased
76 |
77 | /**
78 | * @param args the command line arguments
79 | */
80 | public static void main(String args[]) {
81 | /* Set the Nimbus look and feel */
82 | //
83 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
84 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
85 | */
86 | try {
87 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
88 | if ("Nimbus".equals(info.getName())) {
89 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
90 | break;
91 | }
92 | }
93 | } catch (ClassNotFoundException ex) {
94 | java.util.logging.Logger.getLogger(TelaPopupMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
95 | } catch (InstantiationException ex) {
96 | java.util.logging.Logger.getLogger(TelaPopupMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
97 | } catch (IllegalAccessException ex) {
98 | java.util.logging.Logger.getLogger(TelaPopupMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
99 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
100 | java.util.logging.Logger.getLogger(TelaPopupMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
101 | }
102 | //
103 |
104 | /* Create and display the form */
105 | java.awt.EventQueue.invokeLater(new Runnable() {
106 | public void run() {
107 | new TelaPopupMenu().setVisible(true);
108 | }
109 | });
110 | }
111 |
112 | // Variables declaration - do not modify//GEN-BEGIN:variables
113 | private javax.swing.JMenuItem jMenuItem1;
114 | private javax.swing.JMenuItem jMenuItem2;
115 | private javax.swing.JMenuItem jMenuItem3;
116 | private javax.swing.JPopupMenu jPopupMenu1;
117 | // End of variables declaration//GEN-END:variables
118 | }
119 |
--------------------------------------------------------------------------------
/src/view/TelaPrincipal.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
162 |
--------------------------------------------------------------------------------
/src/view/TelaPrincipal.java:
--------------------------------------------------------------------------------
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 view;
7 |
8 | import java.awt.Color;
9 |
10 | /**
11 | *
12 | * @author Samuelson
13 | */
14 | public class TelaPrincipal extends javax.swing.JFrame {
15 |
16 | /**
17 | * Creates new form TelaPrincipal
18 | */
19 | public TelaPrincipal() {
20 | initComponents();
21 | jMenuBar1.setBackground(Color.BLACK);
22 | jMenu1.setBackground(Color.BLACK);
23 | jMenuBar1.setForeground(Color.white);
24 | jMenu1.setForeground(Color.white);
25 | }
26 |
27 | /**
28 | * 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.
29 | */
30 | @SuppressWarnings("unchecked")
31 | // //GEN-BEGIN:initComponents
32 | private void initComponents() {
33 |
34 | jMenuBar1 = new javax.swing.JMenuBar();
35 | jMenu1 = new javax.swing.JMenu();
36 | jMenuItem1 = new javax.swing.JMenuItem();
37 | jMenu2 = new javax.swing.JMenu();
38 | jMenuItem2 = new javax.swing.JMenuItem();
39 | jMenuItem3 = new javax.swing.JMenuItem();
40 | jMenuItem4 = new javax.swing.JMenuItem();
41 | jMenuItem5 = new javax.swing.JMenuItem();
42 | jMenu3 = new javax.swing.JMenu();
43 | jMenuItem6 = new javax.swing.JMenuItem();
44 | jMenuItem7 = new javax.swing.JMenuItem();
45 | jMenuItem8 = new javax.swing.JMenuItem();
46 | jMenuItem9 = new javax.swing.JMenuItem();
47 | jMenu4 = new javax.swing.JMenu();
48 |
49 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
50 | setTitle("Principal");
51 |
52 | jMenuBar1.setBackground(new java.awt.Color(255, 102, 102));
53 | jMenuBar1.setForeground(new java.awt.Color(255, 51, 51));
54 |
55 | jMenu1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/page.png"))); // NOI18N
56 | jMenu1.setText("Arquivo");
57 |
58 | jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/door_out.png"))); // NOI18N
59 | jMenuItem1.setText("Sair");
60 | jMenu1.add(jMenuItem1);
61 |
62 | jMenuBar1.add(jMenu1);
63 |
64 | jMenu2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user.png"))); // NOI18N
65 | jMenu2.setText("Usuarios");
66 |
67 | jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user_add.png"))); // NOI18N
68 | jMenuItem2.setText("Cadastrar");
69 | jMenu2.add(jMenuItem2);
70 |
71 | jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user_edit.png"))); // NOI18N
72 | jMenuItem3.setText("Alterar");
73 | jMenu2.add(jMenuItem3);
74 |
75 | jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user_delete.png"))); // NOI18N
76 | jMenuItem4.setText("Excluir");
77 | jMenu2.add(jMenuItem4);
78 |
79 | jMenuItem5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/zoom.png"))); // NOI18N
80 | jMenuItem5.setText("Pesquisar");
81 | jMenu2.add(jMenuItem5);
82 |
83 | jMenuBar1.add(jMenu2);
84 |
85 | jMenu3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group.png"))); // NOI18N
86 | jMenu3.setText("Clientes");
87 |
88 | jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group_add.png"))); // NOI18N
89 | jMenuItem6.setText("Cadastrar");
90 | jMenu3.add(jMenuItem6);
91 |
92 | jMenuItem7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group.png"))); // NOI18N
93 | jMenuItem7.setText("Alterar");
94 | jMenu3.add(jMenuItem7);
95 |
96 | jMenuItem8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group_delete.png"))); // NOI18N
97 | jMenuItem8.setText("Excluir");
98 | jMenu3.add(jMenuItem8);
99 |
100 | jMenuItem9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/zoom.png"))); // NOI18N
101 | jMenuItem9.setText("Pesquisar");
102 | jMenu3.add(jMenuItem9);
103 |
104 | jMenuBar1.add(jMenu3);
105 |
106 | jMenu4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/information.png"))); // NOI18N
107 | jMenu4.setText("Sobre");
108 | jMenuBar1.add(jMenu4);
109 |
110 | setJMenuBar(jMenuBar1);
111 |
112 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
113 | getContentPane().setLayout(layout);
114 | layout.setHorizontalGroup(
115 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
116 | .addGap(0, 400, Short.MAX_VALUE)
117 | );
118 | layout.setVerticalGroup(
119 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
120 | .addGap(0, 279, Short.MAX_VALUE)
121 | );
122 |
123 | pack();
124 | setLocationRelativeTo(null);
125 | }// //GEN-END:initComponents
126 |
127 | /**
128 | * @param args the command line arguments
129 | */
130 | public static void main(String args[]) {
131 | /* Set the Nimbus look and feel */
132 | //
133 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
134 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
135 | */
136 | try {
137 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
138 | if ("Nimbus".equals(info.getName())) {
139 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
140 | break;
141 | }
142 | }
143 | } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
144 | System.err.println(ex);
145 | }
146 | //
147 |
148 | //
149 |
150 | /* Create and display the form */
151 | java.awt.EventQueue.invokeLater(new Runnable() {
152 | public void run() {
153 | new TelaPrincipal().setVisible(true);
154 | }
155 | });
156 | }
157 |
158 | // Variables declaration - do not modify//GEN-BEGIN:variables
159 | private javax.swing.JMenu jMenu1;
160 | private javax.swing.JMenu jMenu2;
161 | private javax.swing.JMenu jMenu3;
162 | private javax.swing.JMenu jMenu4;
163 | private javax.swing.JMenuBar jMenuBar1;
164 | private javax.swing.JMenuItem jMenuItem1;
165 | private javax.swing.JMenuItem jMenuItem2;
166 | private javax.swing.JMenuItem jMenuItem3;
167 | private javax.swing.JMenuItem jMenuItem4;
168 | private javax.swing.JMenuItem jMenuItem5;
169 | private javax.swing.JMenuItem jMenuItem6;
170 | private javax.swing.JMenuItem jMenuItem7;
171 | private javax.swing.JMenuItem jMenuItem8;
172 | private javax.swing.JMenuItem jMenuItem9;
173 | // End of variables declaration//GEN-END:variables
174 | }
175 |
--------------------------------------------------------------------------------
/src/view/TelaPrincipalMDI.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
174 |
--------------------------------------------------------------------------------
/src/view/TelaPrincipalMDI.java:
--------------------------------------------------------------------------------
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 view;
7 |
8 | import javax.swing.JDesktopPane;
9 | import javax.swing.JOptionPane;
10 |
11 | /**
12 | *
13 | * @author Samuelson
14 | */
15 | public class TelaPrincipalMDI extends javax.swing.JFrame {
16 |
17 | /**
18 | * Creates new form TelaPrincipal
19 | */
20 | public TelaPrincipalMDI() {
21 | initComponents();
22 | }
23 |
24 | private TelaCadastroUsuario telaCadUser;
25 |
26 | /**
27 | * 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.
28 | */
29 | @SuppressWarnings("unchecked")
30 | // //GEN-BEGIN:initComponents
31 | private void initComponents() {
32 |
33 | jDesktopPane1 = new javax.swing.JDesktopPane();
34 | jMenuBar1 = new javax.swing.JMenuBar();
35 | jMenu1 = new javax.swing.JMenu();
36 | jMenuItem1 = new javax.swing.JMenuItem();
37 | jMenu2 = new javax.swing.JMenu();
38 | jMenuItem2 = new javax.swing.JMenuItem();
39 | jMenuItem3 = new javax.swing.JMenuItem();
40 | jMenuItem4 = new javax.swing.JMenuItem();
41 | jMenuItem5 = new javax.swing.JMenuItem();
42 | jMenu3 = new javax.swing.JMenu();
43 | jMenuItem6 = new javax.swing.JMenuItem();
44 | jMenuItem7 = new javax.swing.JMenuItem();
45 | jMenuItem8 = new javax.swing.JMenuItem();
46 | jMenuItem9 = new javax.swing.JMenuItem();
47 | jMenu4 = new javax.swing.JMenu();
48 |
49 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
50 | setTitle("Principal");
51 |
52 | javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1);
53 | jDesktopPane1.setLayout(jDesktopPane1Layout);
54 | jDesktopPane1Layout.setHorizontalGroup(
55 | jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
56 | .addGap(0, 400, Short.MAX_VALUE)
57 | );
58 | jDesktopPane1Layout.setVerticalGroup(
59 | jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
60 | .addGap(0, 279, Short.MAX_VALUE)
61 | );
62 |
63 | jMenu1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/page.png"))); // NOI18N
64 | jMenu1.setText("Arquivo");
65 |
66 | jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/door_out.png"))); // NOI18N
67 | jMenuItem1.setText("Sair");
68 | jMenu1.add(jMenuItem1);
69 |
70 | jMenuBar1.add(jMenu1);
71 |
72 | jMenu2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user.png"))); // NOI18N
73 | jMenu2.setText("Usuarios");
74 |
75 | jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user_add.png"))); // NOI18N
76 | jMenuItem2.setText("Cadastrar");
77 | jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
78 | public void actionPerformed(java.awt.event.ActionEvent evt) {
79 | jMenuItem2ActionPerformed(evt);
80 | }
81 | });
82 | jMenu2.add(jMenuItem2);
83 |
84 | jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user_edit.png"))); // NOI18N
85 | jMenuItem3.setText("Alterar");
86 | jMenu2.add(jMenuItem3);
87 |
88 | jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user_delete.png"))); // NOI18N
89 | jMenuItem4.setText("Excluir");
90 | jMenu2.add(jMenuItem4);
91 |
92 | jMenuItem5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/zoom.png"))); // NOI18N
93 | jMenuItem5.setText("Pesquisar");
94 | jMenu2.add(jMenuItem5);
95 |
96 | jMenuBar1.add(jMenu2);
97 |
98 | jMenu3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group.png"))); // NOI18N
99 | jMenu3.setText("Clientes");
100 |
101 | jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group_add.png"))); // NOI18N
102 | jMenuItem6.setText("Cadastrar");
103 | jMenu3.add(jMenuItem6);
104 |
105 | jMenuItem7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group.png"))); // NOI18N
106 | jMenuItem7.setText("Alterar");
107 | jMenu3.add(jMenuItem7);
108 |
109 | jMenuItem8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group_delete.png"))); // NOI18N
110 | jMenuItem8.setText("Excluir");
111 | jMenu3.add(jMenuItem8);
112 |
113 | jMenuItem9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/zoom.png"))); // NOI18N
114 | jMenuItem9.setText("Pesquisar");
115 | jMenu3.add(jMenuItem9);
116 |
117 | jMenuBar1.add(jMenu3);
118 |
119 | jMenu4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/information.png"))); // NOI18N
120 | jMenu4.setText("Sobre");
121 | jMenuBar1.add(jMenu4);
122 |
123 | setJMenuBar(jMenuBar1);
124 |
125 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
126 | getContentPane().setLayout(layout);
127 | layout.setHorizontalGroup(
128 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
129 | .addComponent(jDesktopPane1)
130 | );
131 | layout.setVerticalGroup(
132 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
133 | .addComponent(jDesktopPane1)
134 | );
135 |
136 | pack();
137 | setLocationRelativeTo(null);
138 | }// //GEN-END:initComponents
139 |
140 | private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
141 |
142 | if (telaCadUser == null) {
143 | telaCadUser = new TelaCadastroUsuario();
144 | jDesktopPane1.add(telaCadUser);
145 | }
146 | telaCadUser.setVisible(true);
147 |
148 |
149 | }//GEN-LAST:event_jMenuItem2ActionPerformed
150 |
151 | /**
152 | * @param args the command line arguments
153 | */
154 | public static void main(String args[]) {
155 | /* Set the Nimbus look and feel */
156 | //
157 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
158 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
159 | */
160 | try {
161 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
162 | if ("Nimbus".equals(info.getName())) {
163 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
164 | break;
165 | }
166 | }
167 | } catch (ClassNotFoundException ex) {
168 | java.util.logging.Logger.getLogger(TelaPrincipalMDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
169 | } catch (InstantiationException ex) {
170 | java.util.logging.Logger.getLogger(TelaPrincipalMDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
171 | } catch (IllegalAccessException ex) {
172 | java.util.logging.Logger.getLogger(TelaPrincipalMDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
173 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
174 | java.util.logging.Logger.getLogger(TelaPrincipalMDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
175 | }
176 | //
177 |
178 | /* Create and display the form */
179 | java.awt.EventQueue.invokeLater(new Runnable() {
180 | public void run() {
181 | new TelaPrincipalMDI().setVisible(true);
182 | }
183 | });
184 | }
185 |
186 | // Variables declaration - do not modify//GEN-BEGIN:variables
187 | private javax.swing.JDesktopPane jDesktopPane1;
188 | private javax.swing.JMenu jMenu1;
189 | private javax.swing.JMenu jMenu2;
190 | private javax.swing.JMenu jMenu3;
191 | private javax.swing.JMenu jMenu4;
192 | private javax.swing.JMenuBar jMenuBar1;
193 | private javax.swing.JMenuItem jMenuItem1;
194 | private javax.swing.JMenuItem jMenuItem2;
195 | private javax.swing.JMenuItem jMenuItem3;
196 | private javax.swing.JMenuItem jMenuItem4;
197 | private javax.swing.JMenuItem jMenuItem5;
198 | private javax.swing.JMenuItem jMenuItem6;
199 | private javax.swing.JMenuItem jMenuItem7;
200 | private javax.swing.JMenuItem jMenuItem8;
201 | private javax.swing.JMenuItem jMenuItem9;
202 | // End of variables declaration//GEN-END:variables
203 | }
204 |
--------------------------------------------------------------------------------
/src/view/TelaPrincipalSDI.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
157 |
--------------------------------------------------------------------------------
/src/view/TelaPrincipalSDI.java:
--------------------------------------------------------------------------------
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 |
7 | package view;
8 |
9 | /**
10 | *
11 | * @author Samuelson
12 | */
13 | public class TelaPrincipalSDI extends javax.swing.JFrame {
14 |
15 | /**
16 | * Creates new form TelaPrincipal
17 | */
18 | public TelaPrincipalSDI() {
19 | initComponents();
20 | }
21 |
22 | /**
23 | * This method is called from within the constructor to initialize the form.
24 | * WARNING: Do NOT modify this code. The content of this method is always
25 | * regenerated by the Form Editor.
26 | */
27 | @SuppressWarnings("unchecked")
28 | // //GEN-BEGIN:initComponents
29 | private void initComponents() {
30 |
31 | jMenuBar1 = new javax.swing.JMenuBar();
32 | jMenu1 = new javax.swing.JMenu();
33 | jMenuItem1 = new javax.swing.JMenuItem();
34 | jMenu2 = new javax.swing.JMenu();
35 | jMenuItem2 = new javax.swing.JMenuItem();
36 | jMenuItem3 = new javax.swing.JMenuItem();
37 | jMenuItem4 = new javax.swing.JMenuItem();
38 | jMenuItem5 = new javax.swing.JMenuItem();
39 | jMenu3 = new javax.swing.JMenu();
40 | jMenuItem6 = new javax.swing.JMenuItem();
41 | jMenuItem7 = new javax.swing.JMenuItem();
42 | jMenuItem8 = new javax.swing.JMenuItem();
43 | jMenuItem9 = new javax.swing.JMenuItem();
44 | jMenu4 = new javax.swing.JMenu();
45 |
46 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
47 | setTitle("Principal");
48 |
49 | jMenu1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/page.png"))); // NOI18N
50 | jMenu1.setText("Arquivo");
51 |
52 | jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/door_out.png"))); // NOI18N
53 | jMenuItem1.setText("Sair");
54 | jMenu1.add(jMenuItem1);
55 |
56 | jMenuBar1.add(jMenu1);
57 |
58 | jMenu2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user.png"))); // NOI18N
59 | jMenu2.setText("Usuarios");
60 |
61 | jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user_add.png"))); // NOI18N
62 | jMenuItem2.setText("Cadastrar");
63 | jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
64 | public void actionPerformed(java.awt.event.ActionEvent evt) {
65 | jMenuItem2ActionPerformed(evt);
66 | }
67 | });
68 | jMenu2.add(jMenuItem2);
69 |
70 | jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user_edit.png"))); // NOI18N
71 | jMenuItem3.setText("Alterar");
72 | jMenu2.add(jMenuItem3);
73 |
74 | jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user_delete.png"))); // NOI18N
75 | jMenuItem4.setText("Excluir");
76 | jMenu2.add(jMenuItem4);
77 |
78 | jMenuItem5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/zoom.png"))); // NOI18N
79 | jMenuItem5.setText("Pesquisar");
80 | jMenu2.add(jMenuItem5);
81 |
82 | jMenuBar1.add(jMenu2);
83 |
84 | jMenu3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group.png"))); // NOI18N
85 | jMenu3.setText("Clientes");
86 |
87 | jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group_add.png"))); // NOI18N
88 | jMenuItem6.setText("Cadastrar");
89 | jMenu3.add(jMenuItem6);
90 |
91 | jMenuItem7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group.png"))); // NOI18N
92 | jMenuItem7.setText("Alterar");
93 | jMenu3.add(jMenuItem7);
94 |
95 | jMenuItem8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/group_delete.png"))); // NOI18N
96 | jMenuItem8.setText("Excluir");
97 | jMenu3.add(jMenuItem8);
98 |
99 | jMenuItem9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/zoom.png"))); // NOI18N
100 | jMenuItem9.setText("Pesquisar");
101 | jMenu3.add(jMenuItem9);
102 |
103 | jMenuBar1.add(jMenu3);
104 |
105 | jMenu4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/information.png"))); // NOI18N
106 | jMenu4.setText("Sobre");
107 | jMenuBar1.add(jMenu4);
108 |
109 | setJMenuBar(jMenuBar1);
110 |
111 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
112 | getContentPane().setLayout(layout);
113 | layout.setHorizontalGroup(
114 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
115 | .addGap(0, 400, Short.MAX_VALUE)
116 | );
117 | layout.setVerticalGroup(
118 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
119 | .addGap(0, 279, Short.MAX_VALUE)
120 | );
121 |
122 | pack();
123 | setLocationRelativeTo(null);
124 | }// //GEN-END:initComponents
125 |
126 | private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
127 |
128 | new TelaCadastroUsuarioSDI().setVisible(true);
129 |
130 | }//GEN-LAST:event_jMenuItem2ActionPerformed
131 |
132 | /**
133 | * @param args the command line arguments
134 | */
135 | public static void main(String args[]) {
136 | /* Set the Nimbus look and feel */
137 | //
138 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
139 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
140 | */
141 | try {
142 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
143 | if ("Nimbus".equals(info.getName())) {
144 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
145 | break;
146 | }
147 | }
148 | } catch (ClassNotFoundException ex) {
149 | java.util.logging.Logger.getLogger(TelaPrincipalSDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
150 | } catch (InstantiationException ex) {
151 | java.util.logging.Logger.getLogger(TelaPrincipalSDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
152 | } catch (IllegalAccessException ex) {
153 | java.util.logging.Logger.getLogger(TelaPrincipalSDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
154 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
155 | java.util.logging.Logger.getLogger(TelaPrincipalSDI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
156 | }
157 | //
158 |
159 | /* Create and display the form */
160 | java.awt.EventQueue.invokeLater(new Runnable() {
161 | public void run() {
162 | new TelaPrincipalSDI().setVisible(true);
163 | }
164 | });
165 | }
166 |
167 | // Variables declaration - do not modify//GEN-BEGIN:variables
168 | private javax.swing.JMenu jMenu1;
169 | private javax.swing.JMenu jMenu2;
170 | private javax.swing.JMenu jMenu3;
171 | private javax.swing.JMenu jMenu4;
172 | private javax.swing.JMenuBar jMenuBar1;
173 | private javax.swing.JMenuItem jMenuItem1;
174 | private javax.swing.JMenuItem jMenuItem2;
175 | private javax.swing.JMenuItem jMenuItem3;
176 | private javax.swing.JMenuItem jMenuItem4;
177 | private javax.swing.JMenuItem jMenuItem5;
178 | private javax.swing.JMenuItem jMenuItem6;
179 | private javax.swing.JMenuItem jMenuItem7;
180 | private javax.swing.JMenuItem jMenuItem8;
181 | private javax.swing.JMenuItem jMenuItem9;
182 | // End of variables declaration//GEN-END:variables
183 | }
184 |
--------------------------------------------------------------------------------
/src/view/TelaSlider.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
66 |
--------------------------------------------------------------------------------
/src/view/TelaSlider.java:
--------------------------------------------------------------------------------
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 view;
7 |
8 | /**
9 | *
10 | * @author Samuelson
11 | */
12 | public class TelaSlider extends javax.swing.JFrame {
13 |
14 | /**
15 | * Creates new form TelaSlider
16 | */
17 | public TelaSlider() {
18 | initComponents();
19 | }
20 |
21 | /**
22 | * 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.
23 | */
24 | @SuppressWarnings("unchecked")
25 | // //GEN-BEGIN:initComponents
26 | private void initComponents() {
27 |
28 | jSlider1 = new javax.swing.JSlider();
29 | jLabel1 = new javax.swing.JLabel();
30 |
31 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
32 |
33 | jSlider1.addChangeListener(new javax.swing.event.ChangeListener() {
34 | public void stateChanged(javax.swing.event.ChangeEvent evt) {
35 | jSlider1StateChanged(evt);
36 | }
37 | });
38 |
39 | jLabel1.setText("jLabel1");
40 |
41 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
42 | getContentPane().setLayout(layout);
43 | layout.setHorizontalGroup(
44 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
45 | .addGroup(layout.createSequentialGroup()
46 | .addContainerGap(112, Short.MAX_VALUE)
47 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
48 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
49 | .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
50 | .addGap(88, 88, 88))
51 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
52 | .addComponent(jLabel1)
53 | .addGap(177, 177, 177))))
54 | );
55 | layout.setVerticalGroup(
56 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
57 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
58 | .addContainerGap(140, Short.MAX_VALUE)
59 | .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
60 | .addGap(73, 73, 73)
61 | .addComponent(jLabel1)
62 | .addGap(47, 47, 47))
63 | );
64 |
65 | pack();
66 | }// //GEN-END:initComponents
67 |
68 | private void jSlider1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSlider1StateChanged
69 | // TODO add your handling code here:
70 |
71 | jLabel1.setText(String.valueOf(jSlider1.getValue()));
72 |
73 | }//GEN-LAST:event_jSlider1StateChanged
74 |
75 | /**
76 | * @param args the command line arguments
77 | */
78 | public static void main(String args[]) {
79 | /* Set the Nimbus look and feel */
80 | //
81 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
82 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
83 | */
84 | try {
85 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
86 | if ("Nimbus".equals(info.getName())) {
87 | javax.swing.UIManager.setLookAndFeel(info.getClassName());
88 | break;
89 | }
90 | }
91 | } catch (ClassNotFoundException ex) {
92 | java.util.logging.Logger.getLogger(TelaSlider.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
93 | } catch (InstantiationException ex) {
94 | java.util.logging.Logger.getLogger(TelaSlider.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
95 | } catch (IllegalAccessException ex) {
96 | java.util.logging.Logger.getLogger(TelaSlider.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
97 | } catch (javax.swing.UnsupportedLookAndFeelException ex) {
98 | java.util.logging.Logger.getLogger(TelaSlider.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
99 | }
100 | //
101 |
102 | /* Create and display the form */
103 | java.awt.EventQueue.invokeLater(new Runnable() {
104 | public void run() {
105 | new TelaSlider().setVisible(true);
106 | }
107 | });
108 | }
109 |
110 | // Variables declaration - do not modify//GEN-BEGIN:variables
111 | private javax.swing.JLabel jLabel1;
112 | private javax.swing.JSlider jSlider1;
113 | // End of variables declaration//GEN-END:variables
114 | }
115 |
--------------------------------------------------------------------------------
/src/view/viewJTable.form:
--------------------------------------------------------------------------------
1 |
2 |
3 |
227 |
--------------------------------------------------------------------------------