Java JFrame error(JFrame frame, String msg)

Here you can find the source of error(JFrame frame, String msg)

Description

error

License

Open Source License

Declaration

public static void error(JFrame frame, String msg) 

Method Source Code

//package com.java2s;
/**/*from  w ww.j  a  v  a2 s.co  m*/
 * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
 * 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://robocode.sourceforge.net/license/epl-v10.html
 */

import javax.swing.*;

public class Main {
    public static void error(JFrame frame, String msg) {
        Object[] options = { "OK" };

        JOptionPane.showOptionDialog(frame, msg, "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE,
                null, options, options[0]);
    }
}

Related

  1. dispose(final JFrame frame)
  2. doDisableActiveRenderingInEDT(final JFrame jFrame)
  3. drawHelpPanel(String helpToDisplay, final JFrame frame)
  4. enable(final JFrame frame)
  5. enterFullScreenIfPossible(JFrame mainAppFrame)
  6. exitFullScreen(JFrame mainAppFrame)
  7. fileChooser(JFrame frame, boolean saveDialog, String windowName, String filterName, String filterExtension)
  8. findFileOpen(JFrame frame, String ext, String desc)
  9. findFileSave(JFrame frame, String ext, String desc)