aboutbox.java
来自「PIY(Program It Yourself)是一个基于Java的应用程序开发」· Java 代码 · 共 40 行
JAVA
40 行
package piy;
import javax.swing.*;
/**
* The about box that is used in PIY.
* @author David Vivash
* @version 1.0, 29/04/01
*/
public class AboutBox {
private JOptionPane pane = null;
private static Object message = new String[] {
"PIY-II was initially written in 2000/2001",
"by David Vivash, and is now being",
"developed as an open source project."
};
private static AboutBox instance = null;
private AboutBox() {
pane = new JOptionPane(message, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, new ImageIcon("piy/images/about.gif"));
}
public static AboutBox getInstance() {
return (instance == null) ? instance = new AboutBox() :
instance;
}
/**
* Show the about box. This method blocks input to other windows until the
* user clicks "Okay".
*/
public void show() {
JDialog dialog = pane.createDialog(null, "PIY v" + PIY.version);
dialog.setResizable(false);
dialog.show();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?