📄 tishi.java
字号:
package com.skyhawk.hellen;
/*
* Created on 2006-9-30
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
/**
* @author Administrator
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class Tishi extends JFrame implements ActionListener{
JFrame jf=new JFrame("login");
JLabel l1=new JLabel("有新消息!!!!!!!");
JButton loginButton=new JButton("确定");
public Tishi(){
jf.getContentPane().add(l1,"North");
jf.getContentPane().add(loginButton);
jf.setSize(300,200);
jf.pack();jf.setLocation(50,650);
jf.setVisible(true);
loginButton.addActionListener(this);
}
public void actionPerformed(ActionEvent e){
jf.setVisible(false);
}
public static void main(String[] args) {
Tishi aa=new Tishi();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -