serverframe.java

来自「java初学者适用的源码一共分成15章每章都有配套源码,简单易用」· Java 代码 · 共 59 行

JAVA
59
字号

/**
 * Copyright (c) 2001
 * Template File
 *   ServerFrame.java.template
 * IDL Object
 *   humanresourcedemo.HumanResource
 * Generation Date
 *   2001年12月10日 下午10时17分53秒
 * IDL Source File
 *   E:/HumanResourceDemo/src/humanresourcedemo/HumanResource.idl
 * Abstract
 *   Server application frame which is the container for the Server Monitor.
 * @version 1.0
 */

package humanresourcedemo.HumanResource.server;

import java.awt.*;
import java.awt.event.*;

public class ServerFrame extends javax.swing.JFrame
{

  BorderLayout borderLayout1 = new BorderLayout();
  ServerMonitor serverMonitor = new ServerMonitor();

  public ServerFrame()
  {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try
    {
      jbInit();
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
  }

  private void jbInit() throws Exception
  {
    this.getContentPane().setLayout(borderLayout1);
    this.setSize(new Dimension(600, 300));
    this.setTitle("HumanResource server");
    this.getContentPane().add(serverMonitor);
  }

  protected void processWindowEvent(WindowEvent e)
  {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING)
    {
      System.exit(0);
    }
  }
}

⌨️ 快捷键说明

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