userdialog.java

来自「sifi-0.1.6.tar.gz 出自http://www.ifi.unizh」· Java 代码 · 共 77 行

JAVA
77
字号
/* ----------------------------------------------------------------------   The SINUS Firewall -- a TCP/IP packet filter for Linux   Written within the SINUS project at the University of Zurich,   SWITCH, Telekurs Payserv AG, ETH Zurich.   originally based on the sf Firewall Software (C) 1996 by Robert   Muchsel and Roland Schmid.   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   SINUS Firewall resources:   SINUS Homepage: http://www.ifi.unizh.ch/ikm/SINUS/   Firewall Homepage: http://www.ifi.unizh.ch/ikm/SINUS/firewall.html   Frequently asked questions: http://www.ifi.unizh.ch/ikm/SINUS/sf_faq.html   Mailing list for comments, questions, bug reports: firewall@ifi.unizh.ch   ----------------------------------------------------------------------  */package sfclasses;import java.awt.*;import com.sun.java.swing.*;class UserDialog {	// dummy constructor to force loading JOptionPane class	public void UserDialog()	{		JOptionPane op = new JOptionPane();		return;	}	public static void ErrorBox(String errorMessage) {		op.showMessageDialog(null, errorMessage,				"Error", JOptionPane.ERROR_MESSAGE);		return;	}	public static void NoticeBox(String noticeMessage) {		op.showMessageDialog(null, noticeMessage,				"User Notification", JOptionPane.INFORMATION_MESSAGE);		return;	}	public static void WarningBox(String warningMessage) {		op.showMessageDialog(null, warningMessage,				"Warning", JOptionPane.WARNING_MESSAGE);		return;	}	public static void WelcomeBox() {		op.showMessageDialog(null, "Welcome to sf Management Control", "About", JOptionPane.PLAIN_MESSAGE);		return;	}	private static JOptionPane op;		}	// class UserDialog

⌨️ 快捷键说明

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