ftpsession.java~1~
上传用户:lybcsm
上传日期:2007-04-26
资源大小:26k
文件大小:1k
源码类别:

Ftp服务器

开发平台:

Java

  1. package ftpserver;
  2. import java.awt.*;
  3. import java.awt.event.*;
  4. import javax.swing.*;
  5. public class ftpsession extends JFrame {
  6.   JPanel contentPane;
  7.   BorderLayout borderLayout1 = new BorderLayout();
  8.   //Construct the frame
  9.   public ftpsession() {
  10.     enableEvents(AWTEvent.WINDOW_EVENT_MASK);
  11.     try {
  12.       jbInit();
  13.     }
  14.     catch(Exception e) {
  15.       e.printStackTrace();
  16.     }
  17.   }
  18.   //Component initialization
  19.   private void jbInit() throws Exception  {
  20.     contentPane = (JPanel) this.getContentPane();
  21.     contentPane.setLayout(borderLayout1);
  22.     this.setSize(new Dimension(400, 300));
  23.     this.setTitle("Frame Title");
  24.   }
  25.   //Overridden so we can exit when window is closed
  26.   protected void processWindowEvent(WindowEvent e) {
  27.     super.processWindowEvent(e);
  28.     if (e.getID() == WindowEvent.WINDOW_CLOSING) {
  29.       System.exit(0);
  30.     }
  31.   }
  32. }