mem.java

来自「JAVA聊天系统!又一个版本」· Java 代码 · 共 119 行

JAVA
119
字号
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Mem extends JFrame implements ActionListener//实现了ActionLisener接口
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	JButton head,buttonOne,buttonTwo,buttonThree,buttonFour,buttonFive,cancel;
    public Mem()//构造器输出成员列表
	{
	 setVisible(true);
     setBounds(312,183,400,400);
	 Container contentPane=getContentPane();
	 contentPane.setLayout(new GridLayout(7,1));
	 head=new JButton("程序成员表:");
	 buttonFive=new JButton("012006016130   冉禄纯  软件0605");
     buttonOne=new JButton("012006016114   刘欢    软件0605");
	 buttonTwo=new JButton("012006016127   邓国平  软件0605");
	 buttonThree=new JButton("012006016118   杨洋    软件0605");
	 buttonFour=new JButton("012006016116   桂永适  软件0605");
	 cancel=new JButton("谢谢");
	 contentPane.add(head);
	 contentPane.add(buttonFive);
	 contentPane.add(buttonOne);
	 contentPane.add(buttonTwo);
	 contentPane.add(buttonThree);
	 contentPane.add(buttonFour);
	 contentPane.add(cancel);
	 cancel.addActionListener(this);
	 pack();
	 this.addWindowListener(new WindowAdapter()
		{
			public void windowClosing(WindowEvent event) 
	 				{shutDown();}
		}	  
	 );
	}
    public void actionPerformed(ActionEvent e)//actionPerformed方法实现结束功能
	{
		 if(e.getSource()==cancel)
		     {
			 shutDown();
			 }
		
	}
 
	private void shutDown()
	{ 

		this.dispose(); 					
	}

}










/*

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Mem extends JFrame implements ActionListener//实现了ActionLisener接口
{



	
	logoLabel = new JLabel(" ",SwingConstants.CENTER);
    public Mem()//构造器输出成员列表
	{
	 setVisible(true);
     setBounds(312,183,400,400);
	 Container contentPane=getContentPane();
	 contentPane.setLayout(new GridLayout(7,1));
	 contentPane.add(new Label("程序成员表如下:"));
	 contentPane.add(new Label("012006016130   冉禄纯  软件0605"));
	 contentPane.add(new Label("012006016114   刘欢    软件0605"));
	 contentPane.add(new Label("012006016127   邓国平  软件0605"));
	 contentPane.add(new Label("012006016118   杨洋    软件0605"));
	 contentPane.add(new Label("012006016116   桂永适  软件0605"));



	 pack();
	 this.addWindowListener(new WindowAdapter()
		{
			public void windowClosing(WindowEvent event) 
	 				{shutDown();}
		}	  
	 );
	}

 public void actionPerformed(ActionEvent e)//actionPerformed方法实现结束功能
	{
		 if(e.getSource()==cancel)
		     {
			 shutDown();
			 }
		
	}
 
	private void shutDown()
	{ 

		this.dispose(); 					
	}

}
*/

⌨️ 快捷键说明

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