Java JFrame askSave(JFrame frame)

Here you can find the source of askSave(JFrame frame)

Description

ask Save

License

Open Source License

Declaration

public static int askSave(JFrame frame) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.JFrame;

import javax.swing.JOptionPane;

public class Main {
    public static final String SAVE_QUESTION_TITLE = "Really save?";
    public static final String SAVE_QUESTION_MESSAGE = "Do you really want to save this information?\n"
            + "(The current file will be backed up)";

    public static int askSave(JFrame frame) {
        return JOptionPane.showOptionDialog(frame, SAVE_QUESTION_MESSAGE, SAVE_QUESTION_TITLE,
                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, JOptionPane.YES_OPTION);
    }//w w w  .  ja v a  2  s . c  o m
}

Related

  1. addJFrameReporter(JFrame to)
  2. addPanelToFrame(final JFrame frame, final JPanel panel, final String title)
  3. addProgressBar(final JFrame win)
  4. addToQue(JFrame frame)
  5. allPlatformGetFile(String dialogTitle, File locationIn, final String fileExtension, FileFilter nonMacFileFilter, boolean allowMultipleSelect, JFrame parentFrame)
  6. attachAccelerator(Action action, JFrame frame)
  7. btnMnemonicAndToolTip(JFrame frame, JButton a, JButton b, JButton c, JButton e, JButton h, JButton i, JButton l, JButton m, JButton o, JButton p, JButton s, JButton t, JButton enter, JButton altEnter)
  8. buildButton(String btnName, JFrame frame, int x, int y, int w, int h)
  9. buildLabel(JFrame frame, String txt, int x, int y, int w, int h)