Here you can find the source of warningMessage(final String title, final String content)
Parameter | Description |
---|---|
title | the title of the window |
content | the content of the warning |
public static void warningMessage(final String title, final String content)
//package com.java2s; /******************************************************************************* * Copyright (C) 2009, 2015, Danilo Pianini and contributors * listed in the project's build.gradle or pom.xml file. * * This file is distributed under the terms of the Apache License, version 2.0 *******************************************************************************/ import javax.swing.JOptionPane; import javax.swing.SwingUtilities; public class Main { /**/* ww w. jav a 2 s. co m*/ * Displays a warning message. * * @param title * the title of the window * @param content * the content of the warning */ public static void warningMessage(final String title, final String content) { SwingUtilities.invokeLater(new Runnable() { public void run() { JOptionPane.showMessageDialog(null, title, content, JOptionPane.WARNING_MESSAGE); } }); } }