⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aboutdialog.java

📁 SNP算法: 基于背景缩减和阴影检测的统计方法,适用于室内检测.
💻 JAVA
字号:
package bin;import java.awt.*;import javax.swing.border.*;import java.net.*;import javax.swing.text.html.*;import javax.swing.event.*;import javax.swing.*;import java.awt.event.*;public class AboutDialog extends JDialog    implements HyperlinkListener {  JPanel jPanel1 = new JPanel();  JPanel jPanel2 = new JPanel();  JTextArea jTextArea = new JTextArea();  BorderLayout borderLayout1 = new BorderLayout();  Border border1;  BorderLayout borderLayout2 = new BorderLayout();  JLabel MyImage = new JLabel();  JPanel Panel1 = new JPanel();  JButton Close = new JButton();  Border border2;  public AboutDialog(JFrame frame) throws HeadlessException {    super(frame, true);    try {      jbInit();    }    catch (Exception e) {      e.printStackTrace();    }    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();    this.setLocation( (int) (screenSize.width - 416) / 2,                     (int) (screenSize.height - 310) / 2);    this.setResizable(false);  }  private void jbInit() throws Exception {    border1 = BorderFactory.createEmptyBorder(20,25,50,40);    border2 = BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.lightGray,1),BorderFactory.createEmptyBorder(2,10,2,10));    this.setSize(new Dimension(416, 310));    this.setTitle("About");    this.getContentPane().setBackground(Color.white);    this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);    jPanel2.setBackground(Color.white);    jPanel2.setMinimumSize(new Dimension(260, 28));    jPanel2.setPreferredSize(new Dimension(260, 28));    jPanel2.setLayout(borderLayout1);    jPanel1.setBackground(Color.white);    jPanel1.setMinimumSize(new Dimension(160, 10));    jPanel1.setPreferredSize(new Dimension(160, 10));    jPanel1.setLayout(borderLayout2);    jTextArea.setBorder(border1);    jTextArea.setEditable(false);    jTextArea.setText("SNP算法演示系统 V1.0\n\n作者: 段俊杰\n\n时间: 2006.5\n\nEmail:happyjaystar@126.com\n\n"                       + "QQ:190534816\n\n毕业设计哦~~~\n\n");    jTextArea.setLineWrap(true);    jTextArea.setForeground(new Color(55, 77, 118));    this.getContentPane().add(jPanel1, BorderLayout.WEST);    jPanel1.add(MyImage,  BorderLayout.EAST);    this.getContentPane().add(jPanel2, BorderLayout.CENTER);    jPanel2.add(jTextArea, BorderLayout.CENTER);    URLClassLoader urlLoader = (URLClassLoader)this.getClass().getClassLoader();    URL url;    url = urlLoader.findResource("images/me.gif");    ImageIcon icon = new ImageIcon(url);    MyImage.setIcon(icon);    Panel1.setBackground(Color.white);    this.getContentPane().add(Panel1,  BorderLayout.SOUTH);  }  public void hyperlinkUpdate(HyperlinkEvent e) {    if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {      JEditorPane pane = (JEditorPane) e.getSource();      if (e instanceof HTMLFrameHyperlinkEvent) {        HTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent) e;        HTMLDocument doc = (HTMLDocument) pane.getDocument();        doc.processHTMLFrameHyperlinkEvent(evt);      }      else {        try {          pane.setPage(e.getURL());        }        catch (Throwable t) {          t.printStackTrace();        }      }    }  }}

⌨️ 快捷键说明

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