?? aboutframe.java
字號:
/**
* This program is written by Jerry Shen(Shen Ji Feng) use the technology of
* SWING GUI and the OO design
*
* @author Jerry Shen all rights reserved.
* Email:jerry.shen@cognizant.com; jerry_shen_sjf@yahoo.com.cn
* Please report bug to these emails.
* Open source under GPLv3
*
* version 2.0
*/
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
@SuppressWarnings("serial")
class AboutFrame extends JFrame implements MouseListener {
private JPanel aboutPane;
private JLabel msg;
private JLabel msg1;
private JLabel msg2;
private JLabel msg3;
private JButton exit;
public AboutFrame(String strName) {
super(strName);
setSize(180, 200);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
aboutPane = new JPanel();
msg = new JLabel("JMine written by Jerry Shen.");
msg1 = new JLabel(" Enjoy! ");
msg2 = new JLabel("Vision 2.0 ");
msg3 = new JLabel("Release Date: 2008-3-22 ");
exit = new JButton("Exit");
exit.addMouseListener(this);
aboutPane.add(msg);
aboutPane.add(msg1);
aboutPane.add(msg2);
aboutPane.add(msg3);
aboutPane.add(exit);
setContentPane(aboutPane);
setLocation(250, 220);
}
// the event handle to deal with the mouse click
public void mouseClicked(MouseEvent e) {
this.setVisible(false);
}
public void mousePressed(MouseEvent e) {
//System.out.println("Jerry Press");
}
public void mouseReleased(MouseEvent e) {
//System.out.println("Jerry Release");
}
public void mouseExited(MouseEvent e) {
//System.out.println("Jerry Exited");
}
public void mouseEntered(MouseEvent e) {
//System.out.println("Jerry Entered");
}
public static void main(String[] args) {
AboutFrame about = new AboutFrame("Win");
about.setVisible(true);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -