Commits

Francisco Souza committed 1d009ae

Correção do problema com o botão apagar ficha de cadastro, reportado por meio dos issues.

Comments (0)

Files changed (20)

src/br/gov/presidentekennedy/habisoft/boundary/JanelaBuscaPessoas.form

           <Group type="102" alignment="0" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
-              <EmptySpace pref="6" max="32767" attributes="0"/>
+              <EmptySpace pref="10" max="32767" attributes="0"/>
               <Group type="103" groupAlignment="3" attributes="0">
                   <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
                   <Component id="radioMetodoCodigo" alignment="3" min="-2" max="-2" attributes="0"/>

src/br/gov/presidentekennedy/habisoft/boundary/JanelaBuscaPessoas.java

                     this.atualizarTabela();
                 }
             }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            JOptionPane.showMessageDialog(this, "Voc� deve selecionar uma linha na tabela.", "Aviso", JOptionPane.INFORMATION_MESSAGE);
+            e.printStackTrace();
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(this, "N�o foi poss�vel apagar o registro.\nEntre em contato com o suporte.", "Erro", JOptionPane.ERROR_MESSAGE);
             ex.printStackTrace();

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasBeneficiadasPorAno.form

           <Group type="102" alignment="0" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jLabel1" alignment="0" pref="668" max="32767" attributes="1"/>
+                  <Component id="jLabel1" alignment="0" pref="669" max="32767" attributes="1"/>
                   <Group type="102" alignment="0" attributes="0">
                       <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                   <Component id="botaoImprimirFicha" alignment="3" min="-2" max="-2" attributes="0"/>
                   <Component id="botaoApagar" alignment="3" min="-2" max="-2" attributes="0"/>
               </Group>
-              <EmptySpace pref="18" max="32767" attributes="0"/>
+              <EmptySpace pref="22" max="32767" attributes="0"/>
           </Group>
       </Group>
     </DimensionLayout>

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasBeneficiadasPorAno.java

                     this.atualizarTabela();
                 }
             }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            JOptionPane.showMessageDialog(this, "Voc� deve selecionar uma linha na tabela.", "Aviso", JOptionPane.INFORMATION_MESSAGE);
+            e.printStackTrace();
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(this, "N�o foi poss�vel apagar o registro.\nEntre em contato com o suporte.", "Erro", JOptionPane.ERROR_MESSAGE);
             ex.printStackTrace();

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasBeneficiosEmEspera.form

           <Group type="102" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jLabel1" alignment="0" pref="651" max="32767" attributes="0"/>
+                  <Component id="jLabel1" alignment="0" pref="669" max="32767" attributes="0"/>
                   <Group type="102" alignment="1" attributes="0">
                       <Component id="botaoImprimirFicha" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                       <Component id="botaoImprimir" min="-2" max="-2" attributes="0"/>
                   </Group>
-                  <Component id="jScrollPane1" alignment="1" pref="651" max="32767" attributes="0"/>
+                  <Component id="jScrollPane1" alignment="1" pref="669" max="32767" attributes="0"/>
               </Group>
               <EmptySpace max="-2" attributes="0"/>
           </Group>
                   <Component id="botaoAlterarVisualizar" alignment="3" min="-2" max="-2" attributes="0"/>
                   <Component id="botaoImprimirFicha" alignment="3" min="-2" max="-2" attributes="0"/>
               </Group>
-              <EmptySpace max="32767" attributes="0"/>
+              <EmptySpace pref="16" max="32767" attributes="0"/>
           </Group>
       </Group>
     </DimensionLayout>

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasBeneficiosEmEspera.java

                     this.atualizarTabela();
                 }
             }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            JOptionPane.showMessageDialog(this, "Voc� deve selecionar uma linha na tabela.", "Aviso", JOptionPane.INFORMATION_MESSAGE);
+            e.printStackTrace();
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(this, "N�o foi poss�vel apagar o registro.\nEntre em contato com o suporte.", "Erro", JOptionPane.ERROR_MESSAGE);
             ex.printStackTrace();

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasNaoBeneficiadas.form

           <Group type="102" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jLabel1" alignment="0" pref="647" max="32767" attributes="0"/>
+                  <Component id="jLabel1" alignment="0" pref="669" max="32767" attributes="0"/>
                   <Group type="102" alignment="1" attributes="0">
                       <Component id="botaoImprimirFicha" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                       <Component id="botaoImprimir" min="-2" max="-2" attributes="0"/>
                   </Group>
-                  <Component id="jScrollPane1" alignment="1" pref="647" max="32767" attributes="0"/>
+                  <Component id="jScrollPane1" alignment="1" pref="669" max="32767" attributes="0"/>
               </Group>
               <EmptySpace max="-2" attributes="0"/>
           </Group>
           <Group type="102" alignment="1" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
-              <EmptySpace pref="19" max="32767" attributes="0"/>
+              <EmptySpace pref="23" max="32767" attributes="0"/>
               <Component id="jScrollPane1" min="-2" pref="239" max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="3" attributes="0">

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasNaoBeneficiadas.java

                     this.atualizarTabela();
                 }
             }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            JOptionPane.showMessageDialog(this, "Voc� deve selecionar uma linha na tabela.", "Aviso", JOptionPane.INFORMATION_MESSAGE);
+            e.printStackTrace();
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(this, "N�o foi poss�vel apagar o registro.\nEntre em contato com o suporte.", "Erro", JOptionPane.ERROR_MESSAGE);
             ex.printStackTrace();

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasPorBeneficio.form

 <?xml version="1.0" encoding="UTF-8" ?>
 
-<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
   <Properties>
-    <Property name="defaultCloseOperation" type="int" value="2"/>
     <Property name="title" type="java.lang.String" resourceKey="Form.title"/>
-    <Property name="bounds" type="java.awt.Rectangle" editor="org.netbeans.beaninfo.editors.RectangleEditor">
-      <Rectangle value="[50, 70, 0, 0]"/>
-    </Property>
     <Property name="name" type="java.lang.String" value="Form" noResource="true"/>
-    <Property name="resizable" type="boolean" value="false"/>
   </Properties>
   <SyntheticProperties>
     <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
           <Group type="102" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jLabel2" pref="620" max="32767" attributes="0"/>
+                  <Component id="jLabel2" pref="681" max="32767" attributes="0"/>
                   <Group type="102" alignment="0" attributes="0">
                       <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
                       <EmptySpace type="unrelated" max="-2" attributes="0"/>
                       <Component id="comboBeneficios" min="-2" max="-2" attributes="0"/>
                   </Group>
-                  <Component id="jScrollPane1" alignment="0" pref="620" max="32767" attributes="0"/>
+                  <Component id="jScrollPane1" alignment="0" pref="681" max="32767" attributes="0"/>
                   <Group type="102" alignment="1" attributes="0">
                       <EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
                       <Component id="botaoImprimirFicha2" min="-2" max="-2" attributes="0"/>
                   <Component id="botaoAlterarDados" alignment="3" min="-2" max="-2" attributes="0"/>
                   <Component id="botaoImprimirFicha2" alignment="3" min="-2" max="-2" attributes="0"/>
               </Group>
-              <EmptySpace max="32767" attributes="0"/>
+              <EmptySpace pref="16" max="32767" attributes="0"/>
           </Group>
       </Group>
     </DimensionLayout>

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasPorBeneficio.java

                     this.atualizarTabela();
                 }
             }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            JOptionPane.showMessageDialog(this, "Voc� deve selecionar uma linha na tabela.", "Aviso", JOptionPane.INFORMATION_MESSAGE);
+            e.printStackTrace();
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(this, "N�o foi poss�vel apagar o registro.\nEntre em contato com o suporte.", "Erro", JOptionPane.ERROR_MESSAGE);
             ex.printStackTrace();

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasPorIdade.form

 <?xml version="1.0" encoding="UTF-8" ?>
 
-<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
   <Properties>
-    <Property name="defaultCloseOperation" type="int" value="2"/>
     <Property name="title" type="java.lang.String" resourceKey="Form.title"/>
-    <Property name="bounds" type="java.awt.Rectangle" editor="org.netbeans.beaninfo.editors.RectangleEditor">
-      <Rectangle value="[50, 70, 0, 0]"/>
-    </Property>
     <Property name="name" type="java.lang.String" value="Form" noResource="true"/>
-    <Property name="resizable" type="boolean" value="false"/>
   </Properties>
   <SyntheticProperties>
     <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
           <Group type="102" alignment="0" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jScrollPane1" alignment="0" pref="634" max="32767" attributes="0"/>
-                  <Component id="jLabel1" alignment="0" pref="634" max="32767" attributes="0"/>
+                  <Component id="jScrollPane1" alignment="0" pref="669" max="32767" attributes="0"/>
+                  <Component id="jLabel1" alignment="0" pref="669" max="32767" attributes="0"/>
                   <Group type="102" alignment="0" attributes="0">
                       <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                   <Component id="botaoAlterarVisualizar" alignment="3" min="-2" max="-2" attributes="0"/>
                   <Component id="botaoImprimirFicha" alignment="3" min="-2" max="-2" attributes="0"/>
               </Group>
-              <EmptySpace pref="28" max="32767" attributes="0"/>
+              <EmptySpace pref="32" max="32767" attributes="0"/>
           </Group>
       </Group>
     </DimensionLayout>

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasPorIdade.java

                     this.atualizarTabela();
                 }
             }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            JOptionPane.showMessageDialog(this, "Voc� deve selecionar uma linha na tabela.", "Aviso", JOptionPane.INFORMATION_MESSAGE);
+            e.printStackTrace();
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(this, "N�o foi poss�vel apagar o registro.\nEntre em contato com o suporte.", "Erro", JOptionPane.ERROR_MESSAGE);
             ex.printStackTrace();

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasPorLocalOrigem.form

 <?xml version="1.0" encoding="UTF-8" ?>
 
-<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
   <Properties>
-    <Property name="defaultCloseOperation" type="int" value="2"/>
     <Property name="title" type="java.lang.String" resourceKey="Form.title"/>
-    <Property name="bounds" type="java.awt.Rectangle" editor="org.netbeans.beaninfo.editors.RectangleEditor">
-      <Rectangle value="[50, 70, 0, 0]"/>
-    </Property>
     <Property name="name" type="java.lang.String" value="Form" noResource="true"/>
-    <Property name="resizable" type="boolean" value="false"/>
   </Properties>
   <SyntheticProperties>
     <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
           <Group type="102" alignment="0" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jScrollPane1" alignment="0" pref="649" max="32767" attributes="0"/>
-                  <Component id="jLabel1" alignment="0" pref="649" max="32767" attributes="0"/>
+                  <Component id="jScrollPane1" alignment="0" pref="669" max="32767" attributes="0"/>
+                  <Component id="jLabel1" alignment="0" pref="669" max="32767" attributes="0"/>
                   <Group type="102" alignment="0" attributes="0">
                       <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                   <Component id="botaoAlterarVisualizar" alignment="3" min="-2" max="-2" attributes="0"/>
                   <Component id="botaoImprimirFicha" alignment="3" min="-2" max="-2" attributes="0"/>
               </Group>
-              <EmptySpace max="32767" attributes="0"/>
+              <EmptySpace pref="16" max="32767" attributes="0"/>
           </Group>
       </Group>
     </DimensionLayout>

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasPorLocalOrigem.java

                     this.atualizarTabela();
                 }
             }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            JOptionPane.showMessageDialog(this, "Voc� deve selecionar uma linha na tabela.", "Aviso", JOptionPane.INFORMATION_MESSAGE);
+            e.printStackTrace();
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(this, "N�o foi poss�vel apagar o registro.\nEntre em contato com o suporte.", "Erro", JOptionPane.ERROR_MESSAGE);
             ex.printStackTrace();

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasPorLocalidade.form

           <Group type="102" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jLabel2" alignment="0" pref="638" max="32767" attributes="0"/>
+                  <Component id="jLabel2" alignment="0" pref="669" max="32767" attributes="0"/>
                   <Group type="102" alignment="0" attributes="0">
                       <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
                       <EmptySpace type="unrelated" max="-2" attributes="0"/>
                       <Component id="comboLocalidades" min="-2" max="-2" attributes="0"/>
                   </Group>
-                  <Component id="jScrollPane1" alignment="0" pref="638" max="32767" attributes="0"/>
+                  <Component id="jScrollPane1" alignment="0" pref="669" max="32767" attributes="0"/>
                   <Group type="102" alignment="1" attributes="0">
                       <Component id="botaoImprimirFicha2" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                   <Component id="botaoAlterarDados" alignment="3" min="-2" max="-2" attributes="0"/>
                   <Component id="botaoImprimirFicha2" alignment="3" min="-2" max="-2" attributes="0"/>
               </Group>
-              <EmptySpace max="32767" attributes="0"/>
+              <EmptySpace pref="16" max="32767" attributes="0"/>
           </Group>
       </Group>
     </DimensionLayout>

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasPorLocalidade.java

                     this.atualizarTabela();
                 }
             }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            JOptionPane.showMessageDialog(this, "Voc� deve selecionar uma linha na tabela.", "Aviso", JOptionPane.INFORMATION_MESSAGE);
+            e.printStackTrace();
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(this, "N�o foi poss�vel apagar o registro.\nEntre em contato com o suporte.", "Erro", JOptionPane.ERROR_MESSAGE);
             ex.printStackTrace();

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasTerreno.form

 <?xml version="1.0" encoding="UTF-8" ?>
 
-<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
   <NonVisualComponents>
     <Component class="javax.swing.ButtonGroup" name="groupPosse">
     </Component>
   </NonVisualComponents>
   <Properties>
-    <Property name="defaultCloseOperation" type="int" value="2"/>
     <Property name="title" type="java.lang.String" resourceKey="Form.title"/>
-    <Property name="bounds" type="java.awt.Rectangle" editor="org.netbeans.beaninfo.editors.RectangleEditor">
-      <Rectangle value="[50, 70, 0, 0]"/>
-    </Property>
     <Property name="name" type="java.lang.String" value="Form" noResource="true"/>
-    <Property name="resizable" type="boolean" value="false"/>
   </Properties>
   <SyntheticProperties>
     <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
           <Group type="102" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jLabel1" alignment="0" pref="632" max="32767" attributes="0"/>
-                  <Component id="jScrollPane1" alignment="0" pref="632" max="32767" attributes="0"/>
+                  <Component id="jLabel1" alignment="0" pref="669" max="32767" attributes="0"/>
+                  <Component id="jScrollPane1" alignment="0" pref="669" max="32767" attributes="0"/>
                   <Group type="102" alignment="0" attributes="0">
                       <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
           <Group type="102" alignment="0" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
-              <EmptySpace pref="17" max="32767" attributes="0"/>
+              <EmptySpace pref="21" max="32767" attributes="0"/>
               <Group type="103" groupAlignment="3" attributes="0">
                   <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
                   <Component id="radioPosseSim" alignment="3" min="-2" max="-2" attributes="0"/>

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPessoasTerreno.java

                     this.atualizarTabela();
                 }
             }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            JOptionPane.showMessageDialog(this, "Voc� deve selecionar uma linha na tabela.", "Aviso", JOptionPane.INFORMATION_MESSAGE);
+            e.printStackTrace();
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(this, "N�o foi poss�vel apagar o registro.\nEntre em contato com o suporte.", "Erro", JOptionPane.ERROR_MESSAGE);
             ex.printStackTrace();

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPorTempoDeResidencia.form

 <?xml version="1.0" encoding="UTF-8" ?>
 
-<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
   <Properties>
-    <Property name="defaultCloseOperation" type="int" value="2"/>
     <Property name="title" type="java.lang.String" resourceKey="Form.title"/>
-    <Property name="bounds" type="java.awt.Rectangle" editor="org.netbeans.beaninfo.editors.RectangleEditor">
-      <Rectangle value="[50, 70, 0, 0]"/>
-    </Property>
     <Property name="name" type="java.lang.String" value="Form" noResource="true"/>
-    <Property name="resizable" type="boolean" value="false"/>
   </Properties>
   <SyntheticProperties>
     <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
           <Group type="102" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jLabel1" alignment="0" pref="661" max="32767" attributes="0"/>
-                  <Component id="jScrollPane1" alignment="0" pref="661" max="32767" attributes="0"/>
+                  <Component id="jLabel1" alignment="0" pref="669" max="32767" attributes="0"/>
+                  <Component id="jScrollPane1" alignment="0" pref="669" max="32767" attributes="0"/>
                   <Group type="102" alignment="1" attributes="0">
                       <Component id="botaoImprimirFicha" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                   <Component id="comboMesFim" alignment="3" min="-2" max="-2" attributes="0"/>
                   <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
               </Group>
-              <EmptySpace pref="26" max="32767" attributes="0"/>
+              <EmptySpace pref="30" max="32767" attributes="0"/>
               <Component id="jScrollPane1" min="-2" pref="239" max="-2" attributes="0"/>
               <EmptySpace type="unrelated" max="-2" attributes="0"/>
               <Group type="103" groupAlignment="3" attributes="0">

src/br/gov/presidentekennedy/habisoft/boundary/JanelaRelatorioPorTempoDeResidencia.java

                     this.atualizarTabela();
                 }
             }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            JOptionPane.showMessageDialog(this, "Voc� deve selecionar uma linha na tabela.", "Aviso", JOptionPane.INFORMATION_MESSAGE);
+            e.printStackTrace();
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(this, "N�o foi poss�vel apagar o registro.\nEntre em contato com o suporte.", "Erro", JOptionPane.ERROR_MESSAGE);
             ex.printStackTrace();