Package javax.swing

Examples of javax.swing.JOptionPane.showMessageDialog()


     * @param body    body text of dialog
     * @param title   title of dialog
     */
    public static void modalError(Component parent, String body, String title) {
        JOptionPane errorDialog = new JOptionPane();
        errorDialog.showMessageDialog(parent, body, title, JOptionPane.ERROR_MESSAGE);
    }
   
    /**
     * Creates a simple modal error dialog.
     *
 
View Full Code Here


        modalError(parent, body, title);
    }
   
    public static void nonModalError(String body, String title, Exception e) {
        JOptionPane errorDialog = new JOptionPane();
        errorDialog.showMessageDialog(null, body, title, JOptionPane.ERROR_MESSAGE);
    }
   
    /**
     * Dumps a list of active threads in the current thread's ThreadGroup.
     */
 
View Full Code Here

    else
    {
      if (stepMode)
      {
        JOptionPane optionPane = new JOptionPane();
        optionPane.showMessageDialog(this, msg, "TestTool Notification", JOptionPane.INFORMATION_MESSAGE);
      }
      else
      {
        Object[] options = { "OK", "Go back to step mode" };
        if (1 == JOptionPane.showOptionDialog(this, msg, "TestTool Notification",
View Full Code Here

    }
    catch(NoPathFoundException e)
    {
      if (warnUser)
      {
        msg.showMessageDialog(this, "Je suis désolé, mais vous n'avez plus suffisamment de vie pour continuer.\nVous allez mourir ici...", "Mauvaise nouvelle", JOptionPane.WARNING_MESSAGE);
        int ans = msg.showOptionDialog(this, "Voulez-vous recommencer ?", "Redémarrer le niveau", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);
        switch(ans)
        {
        case 0:
          throw(new RestartLevelException());
View Full Code Here

        case 0:
          throw(new RestartLevelException());
        case 1:
          throw(new AbortGameException());
        case 2:
          msg.showMessageDialog(this, "Vous voulez donc continuer, soit.\nMais vous allez mourir sans voir la sortie...");
          warnUser = false;
        default:
          break;
        }
      }
View Full Code Here

    // Clic sur le bouton "Ajouter acteur"
    if(event.getActionCommand() == AJOUTER_ACTEUR){
     
      if(_pnl.get_txtAjoutActeur().getText().equals("")){
       
        info.showMessageDialog(_pnl, "L'acteur doit avoir un prenom et/ou un nom !", ".:: Ajout d'un acteur ::.", info.ERROR_MESSAGE);
      }
      else if (acteurDejaAjoute(_pnl.get_txtAjoutActeur().getText())){
       
        info.showMessageDialog(_pnl, "Attention, vous avez deja� ajoute cet acteur !", ".:: Ajout d'un acteur ::.", info.ERROR_MESSAGE);
      }
View Full Code Here

       
        info.showMessageDialog(_pnl, "L'acteur doit avoir un prenom et/ou un nom !", ".:: Ajout d'un acteur ::.", info.ERROR_MESSAGE);
      }
      else if (acteurDejaAjoute(_pnl.get_txtAjoutActeur().getText())){
       
        info.showMessageDialog(_pnl, "Attention, vous avez deja� ajoute cet acteur !", ".:: Ajout d'un acteur ::.", info.ERROR_MESSAGE);
      }
      else {
        // Au clic sur ajouter acteur, on ajoute l'item dans la liste.
        _pnl.get_lstActeurs().add(_pnl.get_txtAjoutActeur().getText());
        _pnl.get_txtAjoutActeur().setText("")
View Full Code Here

        _pnl.get_lblResultat().setText("-");
        _pnl.get_lstActeurs().remove(_pnl.get_lstActeurs().getSelectedItem());
       
     
      }
      else info.showMessageDialog(_pnl, "Veuillez selectionner un acteur a supprimer !", ".:: Suppression d'un acteur ::.", info.ERROR_MESSAGE);
     
    }
   
   
    // Clic sur le bouton "Ajouter genre"
View Full Code Here

    // Clic sur le bouton "Ajouter genre"
    if(event.getActionCommand() == AJOUTER_GENRE){
     
      if(_pnl.get_cbxGenreFilm().getSelectedItem().toString() == "**-**"){
       
        info.showMessageDialog(_pnl, "Il ne s'agit pas d'un genre", ".:: Ajout d'un genre ::.", info.ERROR_MESSAGE);
      }
     
      if(!genreDejaAjoute(_pnl.get_cbxGenreFilm().getSelectedItem().toString())){
        _pnl.get_lstGenres().add(_pnl.get_cbxGenreFilm().getSelectedItem().toString());
      }
View Full Code Here

      }
     
      if(!genreDejaAjoute(_pnl.get_cbxGenreFilm().getSelectedItem().toString())){
        _pnl.get_lstGenres().add(_pnl.get_cbxGenreFilm().getSelectedItem().toString());
      }
      else info.showMessageDialog(_pnl, "Ce genre a deja� ete ajoute pour ce film !", ".:: Ajout d'un genre ::.", info.ERROR_MESSAGE);
     
    }
   
   
    // Clic sur le bouton "Supprimer genre"
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.