Package org.indrasoftwarelabs.dialogs

Examples of org.indrasoftwarelabs.dialogs.AgregarDialog


            if(valor == null){
              String msg = "Por favor, selecciona un modulo de la lista superior";
                  JOptionPane.showConfirmDialog(frame,msg,"Atencion",JOptionPane.CLOSED_OPTION, JOptionPane.WARNING_MESSAGE);
            }else{
             
                AgregarDialog customDialog = new AgregarDialog(AgregarDialog.MODULO, valor, prop, campoModulo, sentences, listMod_Sen);
               
                customDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
                customDialog.setLocationRelativeTo(frame);
                customDialog.setResizable(false);
                customDialog.setVisible(true);
             
            }
           
          }
        });
        miContenedor.add(botonAgregarMod);
       
        botonAgregarSen = new JButton();
        botonAgregarSen.setIcon(icono);
        //botonAgregarSen.setBounds(40, 380, 30, 30); // x, y, ancho, alto
        botonAgregarSen.setBounds(100, 600, 30, 30); // x, y, ancho, alto
        botonAgregarSen.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent event) {
           
            String valor = (String)listMet.getSelectedValue();
            if(valor == null){
              String msg = "Por favor, selecciona un modulo de la lista superior";
                    JOptionPane.showConfirmDialog(frame,msg,"Atencion",JOptionPane.CLOSED_OPTION, JOptionPane.WARNING_MESSAGE);
            }else{
             
              // Resetar el valor del array de sentencias que hay en la lista
              sentences = new String[listMod_Sen.getModel().getSize()];
              for(int x=0;x<listMod_Sen.getModel().getSize();x++){
                sentences[x] = (String)listMod_Sen.getModel().getElementAt(x);
              }
             
              AgregarDialog customDialog = new AgregarDialog(AgregarDialog.SENTENCE, valor, prop, campoModulo, sentences, listMod_Sen);
             
                customDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
                customDialog.setLocationRelativeTo(frame);
                customDialog.setResizable(false);
                customDialog.setVisible(true);
               
            }
           
          }
        });
View Full Code Here

TOP

Related Classes of org.indrasoftwarelabs.dialogs.AgregarDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.