📄 aboutframe.java
字号:
/*
Copyright (c) 2008, Intel Corporation.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/import java.awt.Toolkit;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JLabel;import com.intel.mobile.base.IntelMobileException;import java.awt.font.*;import java.awt.event.*;/* * Created on 2004-11-18 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates *//** * @ * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */public class AboutFrame extends JFrame { private javax.swing.JPanel jContentPane = null; private JLabel jLabel = null; private JLabel jLabelVersion = null; private JLabel jLabelCopyright = null; //private JLabel jLabelBuildID=null; private JButton jButton = null; /** * This is the default constructor */ public AboutFrame() { super(); initialize(); } private void onTop() { this.toFront(); } /** * This method initializes this * * @return void */ private void initialize() { this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/Resx/Java-app_ico16.gif"))); this.setSize(350,200); this.setContentPane(getJContentPane()); this.setTitle("About Information Viewer"); this.setResizable(false); this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowDeactivated(java.awt.event.WindowEvent e) { onTop(); } }); } private void Close() { this.hide(); } /** * This method initializes jContentPane * * @return javax.swing.JPanel */ private javax.swing.JPanel getJContentPane() { if(jContentPane == null) { jLabelVersion = new JLabel(); jLabelCopyright = new JLabel(); jLabel = new JLabel(); jContentPane = new javax.swing.JPanel(); jContentPane.setLayout(null); java.awt.Font font = new java.awt.Font("Monospaced", java.awt.Font.BOLD, 16); jLabel.setFont(font); jLabel.setBounds(12, 13, 300, 35); jLabel.setText("Intel(R) Mobile Platform SDK"); jLabelVersion.setBounds(12, 50, 300, 28); jLabelVersion.setText("Information Viewer Version 1.3"); jLabelCopyright.setBounds(12, 78, 275, 28); jLabelCopyright.setText("Copyright (C) 2004-2008, Intel Corporation"); //jLabelBuildID= new JLabel(); //jLabelBuildID.setBounds(12, 65, 275, 28); //jLabelBuildID.setText("Build ID: 20041220"); jContentPane.add(jLabel, null); jContentPane.add(jLabelVersion, null); jContentPane.add(jLabelCopyright, null); //jContentPane.add(jLabelBuildID); jContentPane.add(getJButton(), null); } return jContentPane; } /** * This method initializes jButton * * @return javax.swing.JButton */ private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setBounds(196, 106, 75, 25); jButton.setName("btnOK"); jButton.setText("OK"); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Close(); } }); } return jButton; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -