public JournalFilterFrame() {
    try {
      jbInit();

      // set domain in combo box...
      ClientApplet applet =
          ((ApplicationClientFacade) MDIFrame.getInstance().getClientFacade()).getMainClass();
      ButtonCompanyAuthorizations bca = applet.getAuthorizations().getCompanyBa();
      ArrayList companiesList = bca.getCompaniesList("ACC05");
      Domain domain = new Domain("DOMAIN_ACC05");
      for (int i = 0; i < companiesList.size(); i++) {
        if (applet
            .getAuthorizations()
            .getCompanyBa()
            .isInsertEnabled("ACC05", companiesList.get(i).toString()))
          domain.addDomainPair(companiesList.get(i), companiesList.get(i).toString());
      }
      controlCompaniesCombo.setDomain(domain);
      controlCompaniesCombo.getComboBox().setSelectedIndex(0);

      setSize(400, 200);
      MDIFrame.getInstance().add(this);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
  private void jbInit() throws Exception {
    controlDofRef.setAttributeName("docRefNumberDOC01");
    titledBorder1 = new TitledBorder("");
    titledBorder2 = new TitledBorder("");
    labelDocNum.setText("docNumber");
    titledBorder1.setTitle(
        ClientSettings.getInstance().getResources().getResource("document identification"));
    titledBorder1.setTitleColor(Color.blue);
    this.setBorder(titledBorder1);
    this.setLayout(gridBagLayout1);
    labelDocYear.setText("docYear");
    labelDocRif.setText("docRif");
    controlDocRifLookup.setCanCopy(true);
    controlDocRifLookup.setAllowOnlyNumbers(true);
    controlDocRifLookup.setLinkLabel(labelDocRif);
    controlDocRifLookup.setMaxCharacters(20);
    controlDocRifLookup.setEnabledOnEdit(false);
    controlDocRifLookup.setAttributeName("docSequenceDoc01DOC01");
    labelDocDate.setText("docDate");
    labelDocState.setText("docState");

    ClientApplet applet =
        ((ApplicationClientFacade) MDIFrame.getInstance().getClientFacade()).getMainClass();
    ApplicationParametersVO appVO = applet.getAuthorizations();
    if (!appVO.getManualDocNumInSaleDocs().booleanValue()) {
      controlDocNumber.setEnabledOnInsert(false);
      controlDocNumber.setEnabledOnEdit(false);
    }

    controlDocNumber.setLinkLabel(labelDocNum);
    controlDocNumber.setMaxCharacters(255);
    controlDocNumber.setRequired(false);
    controlDocNumber.setAttributeName("docSequenceDOC01");
    controlDocYear.setLinkLabel(labelDocYear);
    controlDocYear.setEnabledOnInsert(false);
    controlDocYear.setEnabledOnEdit(false);
    controlDocYear.setAttributeName("docYearDOC01");
    controlDocTypeRef.setCanCopy(true);
    controlDocTypeRef.setAttributeName("docTypeDoc01DOC01");
    controlDocTypeRef.setLinkLabel(labelDocRif);
    controlDocTypeRef.setEnabledOnInsert(true);
    controlDocTypeRef.setEnabledOnEdit(false);
    controlDocTypeRef.setDomainId("SALE_DOC_TYPE");
    controlDocYearRef.setEnabledOnInsert(false);
    controlDocYearRef.setEnabledOnEdit(false);
    controlDocYearRef.setAttributeName("docYearDoc01DOC01");
    controlDocDate.setCanCopy(true);
    controlDocDate.setLinkLabel(labelDocDate);
    controlDocDate.setRequired(true);
    controlDocDate.setEnabledOnEdit(false);
    controlDocDate.setAttributeName("docDateDOC01");
    controlDocState.setCanCopy(false);
    controlDocState.setLinkLabel(labelDocDate);
    controlDocState.setRequired(true);
    controlDocState.setEnabledOnInsert(false);
    controlDocState.setEnabledOnEdit(false);
    controlDocState.setAttributeName("docStateDOC01");
    controlDocState.setDomainId("DOC01_STATES");
    labelDocRefNr.setText("docRef");
    controlSectional.setAttributeName("sectionalDOC01");
    controlSectional.setEnabledOnInsert(false);
    controlSectional.setEnabledOnEdit(false);
    controlSectional.setTextAlignment(SwingConstants.RIGHT);
    this.add(
        labelDocNum,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    this.add(
        controlDocNumber,
        new GridBagConstraints(
            2,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 0, 5, 5),
            0,
            0));

    if (showDocRefLookup) {
      this.add(
          labelDocRif,
          new GridBagConstraints(
              0,
              1,
              1,
              1,
              0.0,
              0.0,
              GridBagConstraints.WEST,
              GridBagConstraints.NONE,
              new Insets(5, 5, 5, 5),
              0,
              0));
      this.add(
          controlDocTypeRef,
          new GridBagConstraints(
              1,
              1,
              2,
              1,
              0.0,
              0.0,
              GridBagConstraints.WEST,
              GridBagConstraints.HORIZONTAL,
              new Insets(5, 0, 5, 5),
              0,
              0));
      this.add(
          controlDocRifLookup,
          new GridBagConstraints(
              3,
              1,
              2,
              1,
              0.0,
              0.0,
              GridBagConstraints.WEST,
              GridBagConstraints.HORIZONTAL,
              new Insets(5, 0, 5, 5),
              0,
              0));
      this.add(
          controlDocYearRef,
          new GridBagConstraints(
              5,
              1,
              3,
              1,
              1.0,
              0.0,
              GridBagConstraints.WEST,
              GridBagConstraints.NONE,
              new Insets(5, 0, 5, 5),
              40,
              0));
      this.add(
          new JPanel(),
          new GridBagConstraints(
              9,
              0,
              1,
              1,
              1.0,
              0.0,
              GridBagConstraints.WEST,
              GridBagConstraints.HORIZONTAL,
              new Insets(0, 0, 0, 0),
              0,
              0));
    } else {
      this.add(
          labelDocRefNr,
          new GridBagConstraints(
              0,
              1,
              1,
              1,
              0.0,
              0.0,
              GridBagConstraints.WEST,
              GridBagConstraints.NONE,
              new Insets(5, 5, 5, 5),
              0,
              0));
      this.add(
          controlDofRef,
          new GridBagConstraints(
              1,
              1,
              2,
              1,
              0.0,
              0.0,
              GridBagConstraints.WEST,
              GridBagConstraints.HORIZONTAL,
              new Insets(5, 0, 5, 5),
              0,
              0));
    }

    this.add(
        controlDocYear,
        new GridBagConstraints(
            4,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 0, 5, 5),
            0,
            0));
    this.add(
        labelDocYear,
        new GridBagConstraints(
            3,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));

    this.add(
        labelDocDate,
        new GridBagConstraints(
            5,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    this.add(
        controlDocDate,
        new GridBagConstraints(
            6,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            60,
            0));
    this.add(
        labelDocState,
        new GridBagConstraints(
            7,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    this.add(
        controlDocState,
        new GridBagConstraints(
            8,
            0,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    if (showSectional)
      this.add(
          controlSectional,
          new GridBagConstraints(
              1,
              0,
              1,
              1,
              0.0,
              0.0,
              GridBagConstraints.CENTER,
              GridBagConstraints.NONE,
              new Insets(0, 0, 0, 0),
              0,
              0));
  }