⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dialogs.java

📁 fortran并行计算包
💻 JAVA
字号:
/* *  (C) 2001 by Argonne National Laboratory *      See COPYRIGHT in top-level directory. *//* *  @author  Anthony Chan */package viewer.common;import javax.swing.*;import java.awt.*;public class Dialogs{    public static void error( Component p, String txt )    {       JOptionPane.showMessageDialog( p, txt, "Error",                                      JOptionPane.ERROR_MESSAGE );    }    public static void warn( Component p, String txt )    {       JOptionPane.showMessageDialog( p, txt, "Warning",                                      JOptionPane.WARNING_MESSAGE );    }    public static boolean confirm( Component p, String txt )    {        int ans = JOptionPane.showConfirmDialog( p, txt, "Confirmation",                                                 JOptionPane.YES_NO_OPTION );        return ( ans == JOptionPane.YES_OPTION );    }       public static void info( Component p, String txt, ImageIcon icon )    {        if ( icon != null )             JOptionPane.showMessageDialog( p, txt, "Information",                                           JOptionPane.INFORMATION_MESSAGE,                                           icon );        else            JOptionPane.showMessageDialog( p, txt, "Information",                                           JOptionPane.INFORMATION_MESSAGE );    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -