📄 aboutdialog.java
字号:
/* ---------------------------------------------------------------------- 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 java.awt.event.*;/** * <b><i>About</i> Dialog Box</b><br> * This dialog box is displayed when the user selects About in the Help menu. * It contains general information about the software version and copyright.<br> * This is a GUI class. * @version 1.0 16 Dec 1996 * @author Roland E. Schmid */public class AboutDialog extends Dialog implements ActionListener { /** * Initialize the dialog box * @param parent Parent frame of the dialog box. */ public AboutDialog(Frame parent) { super(parent, "About sf Control Panel", true); setResizable(true); GridBagLayout gbl = new GridBagLayout(); GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(3,3,3,3); setLayout(gbl); hLabel = new Label("sf Firewall Control Panel", Label.CENTER); Utils.add_component(this, hLabel, gbl, gbc, 0, 0, 1, 1, 100, 100); Font hf = hLabel.getFont(); hLabel.setFont(new Font(hf.getName(), Font.BOLD, hf.getSize()+3)); Utils.add_component(this, new Label("Version 0.4.0, August 3rd 1998", Label.CENTER), gbl, gbc, 0, 1, 1, 1, 100, 100); Utils.add_component(this, new Label("Copyright \u00A9 1997 Roland E. Schmid", Label.CENTER), gbl, gbc, 0, 2, 1, 1, 100, 100); gbc.fill = GridBagConstraints.NONE; Utils.add_component(this, OKButton = new Button("OK"), gbl, gbc, 0, 3, 1, 1, 0, 0); OKButton.addActionListener(this); pack(); addWindowListener(new ADAdapter()); } class ADAdapter extends WindowAdapter { public void windowClosing(WindowEvent we) { if (isEnabled()) dispose(); } } // ADAdapter public void actionPerformed(ActionEvent ae) { Object source = ae.getSource(); if (source == OKButton) { dispose(); return; } } // actionPerformed private Label hLabel; private Button OKButton; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -