@SuppressWarnings({"empty-statement", "CallToThreadDumpStack"})
    private void miMaterialActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miMaterialActionPerformed

        if (getCadMaterial() != null && !cadMaterial.isVisible()) {
            deskPane.remove(getCadMaterial());
            setCadMaterial(null);
        }
        if (getCadMaterial() == null) {
            setCadMaterial(new FrmCadMaterial(this));
            Validacoes v = new Validacoes();
            v.posicao(this, getCadMaterial());
            deskPane.add(getCadMaterial());
            try {
                getCadMaterial().setSelected(true);
            } catch (PropertyVetoException ex) {
                ex.printStackTrace();
            }
        } else {
            getCadMaterial().toFront();
        }

    }//GEN-LAST:event_miMaterialActionPerformed