Here you can find the source of showMessage(String msg)
public static void showMessage(String msg)
//package com.java2s; import javax.swing.JFrame; import javax.swing.JOptionPane; public class Main { /**//from w w w. j av a 2s . co m * Displays a message in a dialog box. */ public static void showMessage(String msg) { // internal error will be thrown if we try to create a frame // when running and no display is available. try { JFrame f = new JFrame(); JOptionPane.showMessageDialog(f, msg, "Repast Message", JOptionPane.INFORMATION_MESSAGE); f.dispose(); } catch (InternalError ex) { System.out.println("Repast Message: " + msg); } } }