📄 showecm.java~7~
字号:
package texteditor;
/**
* <p>Title: 文本编辑器</p>
* <p>Description: 本软件为面向对象程序设计期末作业,不得擅自修改</p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: 边缘开发室</p>
* @author 第三组 ,组长:谭XX
* @version 1.0
*/
import javax.swing.*;
public class ShowECM
{
public ShowECM()
{
//构造函数,不需要任何初始化
}
//显示出错信息
public static void showError(String content, String title)
{
ImageIcon errPic = new ImageIcon("src/image/error.gif");
JOptionPane.showMessageDialog(null, content, title,
JOptionPane.ERROR_MESSAGE, errPic);
}
public static int showConfirm(String content, String title)
{
ImageIcon errPic = new ImageIcon("src/image/comfirm.gif");
return JOptionPane.showConfirmDialog(null, content, title,
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE, errPic);
}
public static void showMessage(String content, String title)
{
ImageIcon messagePic = new ImageIcon("src/image/java.png");
JOptionPane.showMessageDialog(null, content, title, JOptionPane.OK_OPTION,
messagePic);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -