Java JOptionPane Info info(String message, Component parent)

Here you can find the source of info(String message, Component parent)

Description

Show an info window.

License

Open Source License

Parameter

Parameter Description
message The message to show.
parent Parent component of this dialog.

Declaration

public static void info(String message, Component parent) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2009-2014 Black Rook Software
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
 ******************************************************************************/

import java.awt.Component;

import java.awt.Toolkit;

import javax.swing.JOptionPane;

public class Main {
    /**/*from  ww w .  j av a 2 s.com*/
     * Show an info window.
     * @param message   The message to show.
     */
    public static void info(String message) {
        info(message, null);
    }

    /**
     * Show an info window.
     * @param message   The message to show.
     * @param parent   Parent component of this dialog.
     */
    public static void info(String message, Component parent) {
        Toolkit.getDefaultToolkit().beep();
        JOptionPane.showMessageDialog(parent, message, "Info", JOptionPane.INFORMATION_MESSAGE);
    }
}

Related

  1. flashInfoMessage(final Component sourceComponent, final String message, int durationInMilliSecs)
  2. getIconInformation()
  3. info(Component component, String title, String msg)
  4. info(Component parent, String message)
  5. info(Component parent, String message)
  6. infoBox(String message, String title)
  7. infoMessage(Component owner, String title, String message, ModalityType modalityType)
  8. infoMsg(final String msg)
  9. infoMsg(String msg)