Here you can find the source of info(String message, Component parent)
Parameter | Description |
---|---|
message | The message to show. |
parent | Parent component of this dialog. |
public static void info(String message, Component parent)
//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); } }