/** Update screen size of sessions with the dimension of view. */
  public void updateSize() {
    SessionPane session;

    // 產生跟主視窗一樣大的 image
    terminalImage = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB);

    // 視窗大小調整時同步更新每個 session 的大小
    for (int i = 0; i < sessions.size(); i++) {
      session = (SessionPane) sessions.elementAt(i);
      session.validate();
      session.updateImage(terminalImage);
      session.updateSize();
    }
  }
  /** Constructor with no arguments */
  public ZTerm() {
    sessions = SessionPool.getInstance(); // 各個連線
    resource = Resource.getInstance(); // 各種設定

    // 設定語系
    Locale.setDefault(resource.getLocale());

    // 初始化各種 icon
    tryingIcon = new ImageIcon(getClass().getResource("/res/icon/trying.png"));
    connectedIcon = new ImageIcon(getClass().getResource("/res/icon/connected.png"));
    closedIcon = new ImageIcon(getClass().getResource("/res/icon/closed.png"));
    bellIcon = new ImageIcon(getClass().getResource("/res/icon/bell.png"));

    // 建立系統核心
    model = Model.getInstance();
    model.setView(this);

    configMemberField();
  }