深入浅出JavaSwing程序设计一书的源代码

源代码在线查看: mainframe.java

软件大小: 792 K
上传用户: huanghuanl
关键词: JavaSwing 程序设计 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				import javax.swing.*;
				import java.awt.event.*;
				
				public class MainFrame extends JFrame{
				
				  JDesktopPane desktop;
					
				  public MainFrame(){
				
				    super("MainFrame-Look And Feel");
				    setBounds(100,100,600,400);  
				    buildContent();
				    
				    this.addWindowListener(new WindowAdapter() {
				    	public void windowClosing(WindowEvent e) {
				    	  quit(); 
				        }
				    }); //end of addWindowListener
				  } //end of MainFrame()
				
				  protected void buildContent() {
				    desktop = new JDesktopPane();
				    getContentPane().add(desktop);
				  }//end of buildContent()
				  
				  public void quit(){
				    System.exit(0); 
				  }//end of quit()
				}//end of class MainFrame			

相关资源