Exemplo n.º 1
0
 /**
  * Show a dialog containing a message.
  *
  * @param msg Message to display.
  * @param breakLines If {@code true}, long lines are split.
  */
 public static void userMessage(String msg, boolean breakLines) {
   msg = Msg.msg(msg);
   if (LogUtil.showGui()) {
     LogUtil.consoleMessage(msg);
     JComponent msgComponent = getMessageComponent(msg, breakLines);
     GuiUtils.addModalDialogComponent(msgComponent);
     JOptionPane.showMessageDialog(LogUtil.getCurrentWindow(), msgComponent);
     GuiUtils.removeModalDialogComponent(msgComponent);
   } else {
     System.err.println(msg);
   }
 }