Esconder botão do jToolBar da tela principla

2 respostas
R

Bom dia galera
Estou fazendo uma aplicação em java para Desktop MDI e criei vários métodos genéricos apenas para controlar minhas janelas como abrir, fechar, criar os botoes comuns como salvar, excluit etc… na JToolBar.

Quando inicio a aplicação ele exibe o botão sair e quando abro alguma janela ele esconde esse botão e exibi os botões da janela, até ai parece estar funcionando. O problema é quando fecho a janela. A janela é fechada mas os botões não são escondidos. O código é todo percorrido e não da erro, me parece falta de atualização
Alguém pode me ajudar?

Segue classe principal

public class PrincipalView extends javax.swing.JFrame {

//declarações de variaveis
 private javax.swing.JDesktopPane jDesktopPane;
private javax.swing.JToolBar jTBFerramentas;
private javax.swing.JToolBar jTBAlternaJanelas;
private javax.swing.JPanel jPEstatus;
private javax.swing.JMenu jMCadastro;
private javax.swing.JMenuItem jMICadClienteFornecedor;
private javax.swing.JMenuItem jMICadItem;
private javax.swing.JMenuItem jMIGerenciadorCompra;
private javax.swing.JMenuItem jMINotaFiscalEntrada;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenu jMenu3;
private javax.swing.JMenu jMenu4;
private javax.swing.JMenu jMenu5;
private javax.swing.JMenu jMenu6;
private javax.swing.JMenu jMenu7;
private javax.swing.JMenu jMenu8;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuItem jMenuItem2;
private javax.swing.JMenuItem jMenuItem3;
private javax.swing.JMenuItem jMenuItem4;
private javax.swing.JMenuItem jMenuItem5;
private javax.swing.JPopupMenu.Separator jSeparator1;

//Botões da barra de tarrefa
private JButton jBSair;
private JButton jBSairSistema;
private JButton jBNovo;
private JButton jBLocalizar;
private JButton jBSalvar;
private JButton jBCancelar;
private JButton jBExcluir;
private JSeparator jSeparador1;
private JSeparator jSeparador2;
private JSeparator jSeparador3;
private JSeparator jSeparador4;

//Interface com as ações dos botoes
private AcoesBotoes acoesBotoes;

private static PrincipalView principalView;

public static PrincipalView getIntancia() {
    if (principalView == null) {
        principalView = new PrincipalView();
    }
    return principalView;
}
private PrincipalView() {

initComponents();

}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          
private void initComponents() {

    jTBFerramentas = new javax.swing.JToolBar();
    jTBAlternaJanelas = new javax.swing.JToolBar();
    ImageIcon icon = new ImageIcon(getClass().getResource("/br/com/rene/view/imagem/images.jpg"));
    Image image = icon.getImage();
    jDesktopPane = new javax.swing.JDesktopPane() {
        @Override
        protected void paintComponent(Graphics g) {
            g.drawImage(image, 0, 0, getWidth(), getHeight(), this);
        }
    };
    jPEstatus = new javax.swing.JPanel();

    jMenuBar1 = new javax.swing.JMenuBar();
    jMCadastro = new javax.swing.JMenu();
    jMenu3 = new javax.swing.JMenu();
    jMICadClienteFornecedor = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JPopupMenu.Separator();
    jMenu1 = new javax.swing.JMenu();
    jMICadItem = new javax.swing.JMenuItem();
    jMenuItem1 = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    jMINotaFiscalEntrada = new javax.swing.JMenuItem();
    jMIGerenciadorCompra = new javax.swing.JMenuItem();
    jMenu6 = new javax.swing.JMenu();
    jMenu7 = new javax.swing.JMenu();
    jMenuItem5 = new javax.swing.JMenuItem();
    jMenu5 = new javax.swing.JMenu();
    jMenuItem3 = new javax.swing.JMenuItem();
    jMenuItem4 = new javax.swing.JMenuItem();
    jMenu8 = new javax.swing.JMenu();
    jMenu4 = new javax.swing.JMenu();
    jMenuItem2 = new javax.swing.JMenuItem();

    //Inicializando botões do TollBar
    jBSair = new JButton();
    jBSair.setVisible(false);
    jBSairSistema = new JButton();
    jBSairSistema.setVisible(false);
    jBNovo = new JButton();
    jBNovo.setVisible(false);
    jBLocalizar = new JButton();
    jBLocalizar.setVisible(false);
    jBSalvar = new JButton();
    jBSalvar.setVisible(false);
    jBCancelar = new JButton();
    jBCancelar.setVisible(false);
    jBExcluir = new JButton();
    jBExcluir.setVisible(false);

    jSeparador1 = new JSeparator();
    jSeparador1.setVisible(false);
    jSeparador2 = new JSeparator();
    jSeparador2.setVisible(false);
    jSeparador3 = new JSeparator();
    jSeparador3.setVisible(false);
    jSeparador4 = new JSeparator();
    jSeparador4.setVisible(false);

    jSeparador1.setPreferredSize(new java.awt.Dimension(10, 0));
    jSeparador2.setPreferredSize(new java.awt.Dimension(10, 0));
    jSeparador3.setPreferredSize(new java.awt.Dimension(10, 0));
    jSeparador4.setPreferredSize(new java.awt.Dimension(10, 0));

    ImageIcon img = new javax.swing.ImageIcon(getClass().getResource("/br/com/rene/view/imagem/Voltar.png"));
    img.setImage(img.getImage().getScaledInstance(40, 40, 100));
    jBSairSistema.setIcon(img);
    jBSairSistema.setVisible(false);
    jBSairSistema.setToolTipText("Fechar o sistema");
    jBSairSistema.addActionListener((ActionEvent e) -> {
        fecharSistema();
    });

    ImageIcon img0 = new javax.swing.ImageIcon(getClass().getResource("/br/com/rene/view/imagem/Voltar.png"));
    img0.setImage(img0.getImage().getScaledInstance(40, 40, 100));
    jBSair.setIcon(img0);
    jBSair.setVisible(false);
    jBSair.setToolTipText("Fechar a janela");
    jBSair.addActionListener((ActionEvent evt) -> {
        if (acoesBotoes != null) {
            acoesBotoes.sair();
        } else {
            System.out.println("acoesBotoes sair nulo");
        }});
    ImageIcon img1 = new javax.swing.ImageIcon(getClass().getResource("/br/com/rene/view/imagem/Novo.png"));
    img1.setImage(img1.getImage().getScaledInstance(40, 40, 100));
    jBNovo.setIcon(img1);
    jBNovo.setVisible(false);
    jBNovo.setToolTipText("Novo");
    jBNovo.addActionListener((ActionEvent evt) -> {
        if (acoesBotoes != null) {
            acoesBotoes.novo();
            HabilitaDesabilitaBatao(false);
        } else {
            System.out.println("acoesBotoes novo nulo");
        }
    });
    ImageIcon img2 = new javax.swing.ImageIcon(getClass().getResource("/br/com/rene/view/imagem/Cancelar.png"));
    img2.setImage(img2.getImage().getScaledInstance(40, 40, 100));
    jBCancelar.setIcon(img2);
    jBCancelar.setVisible(false);
    jBCancelar.setToolTipText("Cancelar");
    jBCancelar.addActionListener((ActionEvent evt) -> {
        if (acoesBotoes != null) {
            acoesBotoes.cancelar();
            HabilitaDesabilitaBatao(true);
        } else {
            System.out.println("acoesBotoes camcelar nulo");
        }
    });
    ImageIcon img3 = new javax.swing.ImageIcon(getClass().getResource("/br/com/rene/view/imagem/Excluir.png"));
    img3.setImage(img3.getImage().getScaledInstance(40, 40, 100));
    jBExcluir.setIcon(img3);
    jBExcluir.setVisible(false);
    jBExcluir.setToolTipText("Excluir");
    jBExcluir.addActionListener((ActionEvent evt) -> {
        if (acoesBotoes != null) {
            acoesBotoes.excluir();
        } else {
            System.out.println("acoesBotoes excluir nulo");
        }
    });
    ImageIcon img4 = new javax.swing.ImageIcon(getClass().getResource("/br/com/rene/view/imagem/Localizar.png"));
    img4.setImage(img4.getImage().getScaledInstance(40, 40, 100));
    jBLocalizar.setIcon(img4);
    jBLocalizar.setVisible(false);
    jBLocalizar.setToolTipText("Localizar");
    jBLocalizar.addActionListener((ActionEvent evt) -> {
        if (acoesBotoes != null) {
            acoesBotoes.localizar();
        } else {
            System.out.println("acoesBotoes localizar nulo");
        }
    });
    ImageIcon img5 = new javax.swing.ImageIcon(getClass().getResource("/br/com/rene/view/imagem/Salvar.png"));
    img5.setImage(img5.getImage().getScaledInstance(40, 40, 100));
    jBSalvar.setIcon(img5);
    jBSalvar.setVisible(false);
    jBSalvar.setToolTipText("Salvar");
    jBSalvar.addActionListener((ActionEvent evt) -> {
        if (acoesBotoes != null) {
            acoesBotoes.salvar();
            HabilitaDesabilitaBatao(true);
        } else {
            System.out.println("acoesBotoes salvar nulo");
        }
    });
    montaTBFerramentas();

    setTitle("Rene - ERP Basic");
    setLocationByPlatform(true);

    setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    this.setExtendedState(MAXIMIZED_BOTH);

    jDesktopPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));

    jPEstatus.setBackground(javax.swing.UIManager.getDefaults().getColor("CheckBox.light"));
    jPEstatus.setBorder(javax.swing.BorderFactory.createEtchedBorder(new java.awt.Color(204, 204, 204), null));

    javax.swing.GroupLayout jPEstatusLayout = new javax.swing.GroupLayout(jPEstatus);
    jPEstatus.setLayout(jPEstatusLayout);
    jPEstatusLayout.setHorizontalGroup(
            jPEstatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPEstatusLayout.createSequentialGroup()
                    .addGap(50, 1151, Short.MAX_VALUE))
    );
    jPEstatusLayout.setVerticalGroup(
            jPEstatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    );

    jTBAlternaJanelas.setBackground(new java.awt.Color(236, 238, 241));
    jTBAlternaJanelas.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    jTBAlternaJanelas.setFloatable(false);
    jTBAlternaJanelas.setRollover(true);

    jMenuBar1.setBackground(new java.awt.Color(207, 220, 232));

    jMCadastro.setText("Cadastros");

    jMenu3.setText("Clientes e Foernecedores");

    jMICadClienteFornecedor.setText("Cadastro de Cliente e Fonecedor");
    jMICadClienteFornecedor.addActionListener((java.awt.event.ActionEvent evt) -> {
        jMICadClienteFornecedorActionPerformed(evt);
    });
    jMenu3.add(jMICadClienteFornecedor);

    jMCadastro.add(jMenu3);
    jMCadastro.add(jSeparator1);

    jMenu1.setText("Itens");

    jMICadItem.setText("Cadastro de Item");
    jMICadItem.addActionListener((java.awt.event.ActionEvent evt) -> {
        jMICadItemActionPerformed(evt);
    });
    jMenu1.add(jMICadItem);

    jMenuItem1.setText("Unidade");
    jMenuItem1.addActionListener((java.awt.event.ActionEvent evt) -> {
        jMenuItem1ActionPerformed(evt);
    });
    jMenu1.add(jMenuItem1);

    jMCadastro.add(jMenu1);

    jMenuBar1.add(jMCadastro);

    jMenu2.setText("Cmpras");

    jMINotaFiscalEntrada.setText("Nota Fiscal de Entrada");
    jMINotaFiscalEntrada.addActionListener((java.awt.event.ActionEvent evt) -> {
        jMINotaFiscalEntradaActionPerformed(evt);
    });
    jMenu2.add(jMINotaFiscalEntrada);

    jMIGerenciadorCompra.setText("Gerenciador de Compras");
    jMIGerenciadorCompra.addActionListener((java.awt.event.ActionEvent evt) -> {
        jMIGerenciadorCompraActionPerformed(evt);
    });
    jMenu2.add(jMIGerenciadorCompra);

    jMenuBar1.add(jMenu2);

    jMenu6.setText("Vendas");
    jMenuBar1.add(jMenu6);

    jMenu7.setText("Estoque");

    jMenuItem5.setText("de Compra");
    jMenu7.add(jMenuItem5);

    jMenuBar1.add(jMenu7);

    jMenu5.setText("Financeiro");

    jMenuItem3.setText("Contas a Pagar");
    jMenu5.add(jMenuItem3);

    jMenuItem4.setText("Contas a Receber");
    jMenu5.add(jMenuItem4);

    jMenuBar1.add(jMenu5);

    jMenu8.setText("Relatórios");
    jMenuBar1.add(jMenu8);

    jMenu4.setText("Configurações");

    /*
    jMenuItem1.addActionListener((ActionEvent evt) -> {
        acoesBotoes = new Janela();
        abrirJanela(Janela.getIntancia());

    });*/
    jMenuItem2.setText("Gerênciar Usuários");
    jMenuItem2.addActionListener((java.awt.event.ActionEvent evt) -> {
        jMenuItem2ActionPerformed(evt);
    });
    jMenu4.add(jMenuItem2);

    jMenuBar1.add(jMenu4);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTBFerramentas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPEstatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                    .addGap(1, 1, 1)
                    .addComponent(jDesktopPane)
                    .addGap(1, 1, 1))
            .addComponent(jTBAlternaJanelas, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    );
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addComponent(jTBFerramentas, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jDesktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 453, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jTBAlternaJanelas, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(1, 1, 1)
                    .addComponent(jPEstatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    );

    setSize(new java.awt.Dimension(1492, 614));
    setLocationRelativeTo(null);

    pack();
}// </editor-fold>                        

private void jMICadItemActionPerformed(java.awt.event.ActionEvent evt) {
    acoesBotoes = CadItemView.getIntancia();
    abrirJanela(CadItemView.getIntancia());
}

private void jMICadClienteFornecedorActionPerformed(java.awt.event.ActionEvent evt) {
    acoesBotoes = CadCliForView.getIntancia();
    //gerenciadorJanelas.abrirJanela(CadCliForView.getIntancia());
}

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
    acoesBotoes = CadUnidadeView.getIntancia();
    abrirJanela(CadUnidadeView.getIntancia());
}

private void jMINotaFiscalEntradaActionPerformed(java.awt.event.ActionEvent evt) {
    //acoesBotoes = new LancNotaFiscalEntradaView();
    // gerenciadorJanelas.abrirJanela(LancNotaFiscalEntradaView.getIntancia());
}

private void jMIGerenciadorCompraActionPerformed(java.awt.event.ActionEvent evt) {
    //gerenciadorJanelas.abrirJanela(GerenciadorCompraView.getIntancia());
}

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {

}

/**
 * @param args the command line arguments
 */
public static void main(String args[]) {

    try {
        for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                javax.swing.UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
        java.util.logging.Logger.getLogger(PrincipalView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    /* Create and display the form */
    java.awt.EventQueue.invokeLater(() -> {
        new PrincipalView().setVisible(true);
    });
}

@Override
protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
        fecharSistema();
    }
    if (e.getID() == WindowEvent.WINDOW_OPENED) {
        criaBotaoSair();
    }
}

private void montaTBFerramentas() {
    jTBFerramentas.add(jBSairSistema);
    jTBFerramentas.add(jBSair);
    jTBFerramentas.add(jSeparador1);
    jTBFerramentas.add(jBNovo);
    jTBFerramentas.add(jSeparador2);
    jTBFerramentas.add(jBExcluir);
    jTBFerramentas.add(jSeparador3);
    jTBFerramentas.add(jBLocalizar);
    jTBFerramentas.add(jBSalvar);
    jTBFerramentas.add(jSeparador4);
    jTBFerramentas.add(jBCancelar);
}

private void HabilitaDesabilitaBatao(boolean habilitar) {
    jBSair.setVisible(habilitar);
    jBNovo.setVisible(habilitar);
    jBSalvar.setVisible(!habilitar);
    jBCancelar.setVisible(!habilitar);
    jBExcluir.setVisible(habilitar);
    jBLocalizar.setVisible(habilitar);
    jSeparador1.setVisible(habilitar);
    jSeparador2.setVisible(habilitar);
    jSeparador3.setVisible(habilitar);
    jSeparador4.setVisible(!habilitar);
    jTBFerramentas.repaint();
}

private void DesabilitaTodosBatao() {
    System.out.println("cheguei em todos botoes");
   // if (jBSair.isVisible() == true) {
        jBSair.setVisible(false);
        System.out.println("cheguei em todos botoes sair");
   // } else if (jBNovo.isVisible() == true) {
        jBNovo.setVisible(false);
        System.out.println("cheguei em todos botoes novo");
  //  }else if (jBCancelar.isVisible() == true) {
        jBCancelar.setVisible(false);
    //} else if (jBExcluir.isVisible() == true) {
        jBExcluir.setVisible(false);
  // } else if (jBLocalizar.isVisible() == true) {
        jBLocalizar.setVisible(false);
  //  } else if (jBSalvar.isVisible() == true) {
        jBSalvar.setVisible(false);
  //  } else if (jSeparador1.isVisible() == true) {
        jSeparador1.setVisible(false);
  //  } else if (jSeparador2.isVisible() == true) {
        jSeparador2.setVisible(false);
  //  } else if (jSeparador3.isVisible() == true) {
        jSeparador3.setVisible(false);
  //  } else if (jSeparador4.isVisible() == true) {
        jSeparador4.setVisible(false);
  //  }
    jTBFerramentas.repaint();
    this.repaint();
}

private void abrirJanela(JInternalFrame jIF) {
    if (jIF.isVisible()) {
        try {
            jIF.toFront();
            jIF.setSelected(true);
            jIF.requestFocus();
        } catch (PropertyVetoException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage(),"ERRO ao mover a janela para frente", JOptionPane.ERROR_MESSAGE);
        }
    } else {
        if (jBSairSistema.isVisible()) {
            jBSairSistema.setVisible(false);
        }
        jDesktopPane.add(jIF);
        jIF.setVisible(true);
        HabilitaDesabilitaBatao(true);
    }
}

public final void criaBotaoSair() {
    jBSairSistema.setVisible(true);
    jTBFerramentas.repaint();
     System.out.println("botão sair sistema visivel");
}

public void fecharJanela(JInternalFrame jIF) {
    jIF.dispose();
    jDesktopPane.remove(jIF);
    DesabilitaTodosBatao();
    if (existeJanelaAberta() == false) {
        criaBotaoSair();
    } else {
        System.out.println("existe janela aberta");
    }
}

private JInternalFrame[] getFrameDesktopPane() {
    JInternalFrame[] abertos;
    abertos = jDesktopPane.getAllFrames();
    return abertos;
}

private boolean existeJanelaAberta() {
    return getFrameDesktopPane().length != 0;
}

public void fecharSistema() {
    if (JOptionPane.showConfirmDialog(null, "Deseja realmente sair?", "Sair do sistema", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
        System.exit(0);
    }
}

}

Segue o código de uma tela

public class CadItemView extends javax.swing.JInternalFrame implements AcoesBotoes {

private ItemControl itemControl;
private static CadItemView cadItemView;
GerenciadorJanelas gerenciadorJanelas;
PrincipalView principalView;

public static CadItemView getIntancia() {
    if (cadItemView == null) {
        cadItemView = new CadItemView();
    }
    return cadItemView;
}

private CadItemView() {
    principalView = PrincipalView.getIntancia();
    try {
        itemControl = new ItemControl();
    } catch (RemoteException e) {
        JOptionPane.showMessageDialog(null, e.getMessage(), "Erro", JOptionPane.ERROR_MESSAGE);
    }
    initComponents();
}

public ItemControl getItemControl() {
    return itemControl;
    //  this.InternalFrameListener;
}
//Ao fechar a janela

private void formInternalFrameClosing(javax.swing.event.InternalFrameEvent evt) {

principalView.fecharJanela(this);

}

//Implementações

<a class="mention" href="/u/override">@Override</a>

public void salvar() {

JOptionPane.showMessageDialog(null, “Ação: Salvar item”, “Mensagem”, JOptionPane.INFORMATION_MESSAGE);

}
@Override
public void cancelar() {
    JOptionPane.showMessageDialog(null, "Ação: Cancelar item", "Mensagem", JOptionPane.INFORMATION_MESSAGE);
}

@Override
public void sair() {
    principalView.fecharJanela(this);
}

@Override
public void novo() {
    JOptionPane.showMessageDialog(null, "Ação: Inserir item", "Mensagem", JOptionPane.INFORMATION_MESSAGE);
}

@Override
public void excluir() {
    JOptionPane.showMessageDialog(null, "Ação: Excluir item", "Mensagem", JOptionPane.INFORMATION_MESSAGE);
}

@Override
public void localizar() {
    JOptionPane.showMessageDialog(null, "Localizando item", "Mensagem", JOptionPane.INFORMATION_MESSAGE);
}}

2 Respostas

R

o codigo ficou mal formatado acima

R

Consegui descobrir porque não esta funcionando
Quando chamo a instrução direto no evento do clik do botão ele funciona

jBSair.addActionListener((ActionEvent evt) -> {

if (acoesBotoes != null) {

acoesBotoes.sair();

DesabilitaTodosBatao();

criaBotaoSair();

} else {

System.out.println(acoesBotoes sair nulo);

}});

Porém não intendo. A implementação do botão sair que está na janela CadItemView está executando

Criado 22 de setembro de 2016
Ultima resposta 23 de set. de 2016
Respostas 2
Participantes 1