?? aboutdialog.java
字號:
import javax.swing.*;
import java.awt.*;
/*
**“關于”窗口
*/
public class AboutDialog extends JDialog
{
JPanel jMainPane = new JPanel();
JTabbedPane jTabbedPane = new JTabbedPane();
private JPanel jPanel1 = new JPanel();
private JPanel jPanel2 = new JPanel();
private JTextArea jt1 = new JTextArea(6,6);
private JTextArea jt2 = new JTextArea(6,6);
/*
**構造函數
*/
public AboutDialog()
{
setTitle("端口掃描");
setSize(300,200);
setResizable(false);
setDefaultCloseOperation (WindowConstants.DISPOSE_ON_CLOSE);
Container c = this.getContentPane();
jt1.setSize(260,200);
jt2.setSize(260,200);
jt1.setEditable(false);
jt2.setEditable(false);
jt1.setLineWrap(true);
jt2.setLineWrap(true);
jt1.setText("用同一信息對目標計算機的所有所需掃描的端口進行發送,然后根據返回端口狀態來分析目標計算機的端口是否打開、是否可用。");
jt2.setText("1、選擇掃描方式\n"+"2、點擊“開始掃描”\n"+"3、點擊“保存掃描結果”進行掃描結果的保存");
jt1.setFont(new Font("楷體_GB2312", java.awt.Font.BOLD, 13));
jt1.setForeground(Color.blue);
jt2.setFont(new Font("楷體_GB2312", java.awt.Font.BOLD, 13));
jt2.setForeground(Color.black);
jPanel1.add(jt1);
jPanel2.add(jt2);
jTabbedPane.setSize(300,200);
jTabbedPane.addTab("掃描原理", null, jPanel1, null);
jTabbedPane.addTab("使用說明", null, jPanel2, null);
jMainPane.add(jTabbedPane);
c.add(jMainPane);
pack();
this.setVisible(true);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -