设计模式是软件工程的核心思想

源代码在线查看: details.java

软件大小: 12095 K
上传用户: yhw002
关键词: 设计模式 核心 软件工程
下载地址: 免注册下载 普通下载 VIP

相关代码

				import java.awt.*;
				import java.awt.event.*;
				import javax.swing.*;
				
				public class Details extends JDialog implements ActionListener {
				
				  public Details(Frame owner, String name, String phone) {
				      super(owner, false);
				      
				      JPanel jp = new JPanel();
				      getContentPane().add(jp);
				      jp.setLayout (new BorderLayout());
				      Box jcent = new Box(BoxLayout.Y_AXIS);
				      jp.add("Center", jcent);
				      
				      jcent.add("Center", new TextField(name));
				      jcent.add("Center", new TextField(phone));
				      JButton OK = new JButton("OK");
				      OK.addActionListener (this);
				      JPanel jbot = new JPanel();
				      jp.add("South", jbot);
				      jbot.add(OK);
				      setSize(new Dimension(200, 100));
				      setVisible(true);
				  }
				  public void actionPerformed(ActionEvent e) {
				      setVisible(false);
				  }
				}
							

相关资源