Java JOptionPane Message showMessage(String title, String message)

Here you can find the source of showMessage(String title, String message)

Description

Display a sample message in a dialog box.

License

Open Source License

Parameter

Parameter Description
message The message to display

Declaration


public static void showMessage(String title, String message) 

Method Source Code


//package com.java2s;
/*/*from w  w  w  .j  a v  a 2 s  .c om*/
 * Copyright (c) 1998 - 2005 Versant Corporation
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * Versant Corporation - initial API and implementation
 */

import javax.swing.*;

public class Main {
    /**
     * Display a sample message in a dialog box.
     * @param message The message to display
     */

    public static void showMessage(String title, String message) {
        JOptionPane.showMessageDialog(null, message, title, JOptionPane.INFORMATION_MESSAGE);
    }
}

Related

  1. showMessage(String message, String title)
  2. showMessage(String msg)
  3. showMessage(String msg)
  4. showMessage(String msg)
  5. showMessage(String msg)
  6. showMessage(String title, String message, java.awt.Component parent)
  7. showMessageInEventQueue(final String message, final String title)
  8. showMessages(Component parent, List messages)
  9. showMsg(final Container parent, final String message)