tishi.java
来自「个人办公平台,用JAVA开发的TOMCAT的服务器」· Java 代码 · 共 48 行
JAVA
48 行
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 + =
减小字号Ctrl + -
显示快捷键?