How to make the jDialog not go out in Java

0

I have a Jframe which contains a table and a button to add a new record, when I click I get a jDialog in which I am doing some validations in case you do not enter anything in the fields, the problem is that when you do not enter nothing I get the message to enter data but instead of staying in the jDialog returns to the Jframe, this is the validation code

if(cboEspecialidad.getSelectedIndex()==0){
            JOptionPane.showMessageDialog(null,
                    "Debe Seleccionar una Especialidad",
                    "Confirmacion",
                    JOptionPane.INFORMATION_MESSAGE);
            return false;
        }
    
asked by Heisenberg 30.06.2018 в 07:25
source

0 answers