> List of tutorials for developing a Fat-Client in Java

Index – Basic knowledge for developing Fat-Clients with Java

Base class for TaskFrame(s) of application-programs - Fat-Client-Development

* For this document and all references (links) please obey the hints and regulations concerning copyright, disclaimer and trademarks.

  • The owner of this web-site (www.javascout.biz) is not responsible for the content of web-sites linked within this document or linked with other documents of www.javascout.biz.

  • If this document or other documents of this web-site (www.javascout.biz) infringes your rights or you think that rights of others (third parties) are infringed, please inform the author.
    An e-mail can be sent by clicking onto the 'hungry mailbox' in the upper right corner.

Last revision of this document:
2006-06-06

This is document contains the code for Class JSBS_TaskFrame.
For easy 'cut and paste' ;-)
This class contains variables and methods used for all StartFrames (CommandCenter) of application-programs.
As an example please see JS_ErrDB_CommandCenter, which inherits this class.

package js_base.frame;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
import javax.swing.text.*;

import js_base.structures.*;

/**
 *
 * @author
kurt@javascout.biz

 * @date 2006-06-06
 *
 * @description
 * Frame to be inherited by 'Task-Frame's.
 * A 'Task-Frame' is a frame with code to handle the processing of business-data.
 
 
* This class contains variables for
 * * Connection to the 'Start-Frame' to have access to variables kept there,
 *   e.g. database-access or access to a Java-Application-Server.
 * * A structure containing date and user-information.
 *   This structure is derived from the JSBS_UniversalParameters held in the
 *   StartFrame.
 *   As some variables from there are addressed pretty often, the variables are copied
 *   at the creation time of this class.
 * * Elements to build the GUI. These elements can be joined together and complemented
 * * with GUI-elements defined in the derived classes.
 *
 
* @change-log
 * when      who          why
 * --------------------------------------------------------
 *
 */

public class JSBS_TaskFrame extends JFrame
                            implements ActionListener, KeyListener, FocusListener {
/*
 * Reference to the 'Start-Frame', also referred as 'Command-Center' or 'CC'.
 * The 'CC' helds general values. */
    public JSBS_StartFrame frmCC = null;
/*
 * Identifier under which this task is registered in the task-list of the CommandCenter. */
    protected double dblCC_TaskID = 0;
/*
 * Structure with neccessary values for database-operations on the Server-Side.
 * These are the minimum of needed parameters to send over to the server. */
    public JSBS_MinimalParameters structMinParm ;
/*
 * GUI-elements for the standard layout. */
     protected JPanel pnl_Main;
     protected JPanel pnl_Main_With_Currency_Selection;
     protected JPanel pnl_Head;
     protected JPanel pnl_Head_With_Currency_Selection;
     protected JPanel pnl_Data;
     protected JPanel pnl_Maintain;
     protected JPanel pnl_Detail;
     protected JPanel pnl_DetailFields;
     protected JPanel pnl_DetailButtons;
     protected JPanel pnl_List;
     protected JPanel pnl_ListFields;
     protected JPanel pnl_ListButtons;
     
protected JPanel pnl_Info;
/*
 * GUI-elements for the pnl_Head (at the top). */
     protected JButton btn_CC;
     protected JButton btn_Print;
     protected JLabel lbl_CurrencySelection;
     protected JComboBox combo_CurrencySelection;
     protected JLabel
lbl_HeadDate;

     protected JLabel lbl_HeadUser;
/*
 * GUI-elements for the pnl_DataButtons (at right side of the Data-Fields). */
     protected JButton btn_Store;
     protected JButton btn_Copy;
     protected JButton btn_Previous;
     protected JButton btn_Next;
/*
 * GUI-elements for the pnl_ListFields (at right side of the List). */
     protected JLabel lbl_SelectionListHeader;
     protected JScrollPane pnl_SelectionList;
     protected JTable pnl_SelectionListTable;
     protected DefaultTableColumnModel pnl_SelectionListTableDefaultTableColumnModel;
     protected JLabel lbl_Selection;
     
protected JTextField txt_Selection;
/*
 * GUI-elements for the pnl_ListButtons (at right side of the List). */
     protected JButton btn_Get;
     
protected JButton btn_Delete;
/*
 * GUI-elements for the pnl_Info (at the bottom). */
     protected JLabel lbl_InfoMessage;
     protected JButton btn_InfoLight;
/*
 * -------------------------------
 * Constructor of the class */
    public JSBS_TaskFrame(JSBS_StartFrame parmCC) {
      super();
/*
 * Keep the reference to the StartFrame (CommandCenter) and
 * transfer the values from the UniversalParameters to the MinimalParameters. */
      frmCC = parmCC;
      structMinParm = new JSBS_MinimalParameters(parmCC.structJSBS_UniversalParameters);

    }
/*
 * ********************
 * Create the GUI-elements. */
    protected JPanel get_pnl_Main() {
/* Auto-create the GUI-element if it does not already exist. */
      
if (
pnl_Main == null) {
        try {
          pnl_Main = new JPanel();
          pnl_Main.setName("pnl_Main");
          pnl_Main.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          
GridBagConstraints gbc_pnl_Head = new GridBagConstraints();
          gbc_pnl_Head.gridx = 0;

          gbc_pnl_Head.gridy = 0;
          gbc_pnl_Head.fill = GridBagConstraints.HORIZONTAL;
          gbc_pnl_Head.weightx = 1;
          gbc_pnl_Head.anchor = GridBagConstraints.CENTER;
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Main().add(get_pnl_Head(), gbc_pnl_Head);
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_Maintain = new GridBagConstraints();
          gbc_pnl_Maintain.gridx = 0;
          gbc_pnl_Maintain.gridy = 1;
          gbc_pnl_Maintain.fill = GridBagConstraints.BOTH;
          gbc_pnl_Maintain.weightx = 1;
          gbc_pnl_Maintain.weighty = 1;
          gbc_pnl_Maintain.anchor = GridBagConstraints.CENTER;

/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Main().add(get_pnl_Maintain(), gbc_pnl_Maintain);
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_Info = new GridBagConstraints();
          gbc_pnl_Info.gridx = 0;
          gbc_pnl_Info.gridy = 2;
          gbc_pnl_Info.fill = GridBagConstraints.HORIZONTAL;
          gbc_pnl_Info.weightx = 1;
          gbc_pnl_Info.anchor = GridBagConstraints.CENTER;
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Main().add(get_pnl_Info(), gbc_pnl_Info)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_Main in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_Main;

    }
/*
 * ******************** */
    protected JPanel get_pnl_Main_With_Currency_Selection() {
/* Auto-create the GUI-element if it does not already exist. */
      if
(
pnl_Main_With_Currency_Selection == null) {
        try {
          pnl_Main_With_Currency_Selection = new JPanel();
          pnl_Main_With_Currency_Selection.setName("pnl_Main_With_Currency_Selectio");
          pnl_Main_With_Currency_Selection.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          
GridBagConstraints gbc_pnl_Head_With_Currency_Selection = new GridBagConstraints();
          gbc_pnl_Head_With_Currency_Selection.gridx = 0;

          gbc_pnl_Head_With_Currency_Selection.gridy = 0;
          gbc_pnl_Head_With_Currency_Selection.fill = GridBagConstraints.HORIZONTAL;
          gbc_pnl_Head_With_Currency_Selection.weightx = 1;
          gbc_pnl_Head_With_Currency_Selection.anchor = GridBagConstraints.CENTER;
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Main_With_Currency_Selection().add(get_pnl_Head_With_Currency_Selection(),
                                                     gbc_pnl_Head_With_Currency_Selection);
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_Maintain = new GridBagConstraints();
          gbc_pnl_Maintain.gridx = 0;
          gbc_pnl_Maintain.gridy = 1;
          gbc_pnl_Maintain.fill = GridBagConstraints.BOTH;
          gbc_pnl_Maintain.weightx = 1;
          gbc_pnl_Maintain.weighty = 1;
          gbc_pnl_Maintain.anchor = GridBagConstraints.CENTER;

/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Main_With_Currency_Selection().add(get_pnl_Maintain(), gbc_pnl_Maintain);
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_Info = new GridBagConstraints();
          gbc_pnl_Info.gridx = 0;
          gbc_pnl_Info.gridy = 2;
          gbc_pnl_Info.fill = GridBagConstraints.HORIZONTAL;
          gbc_pnl_Info.weightx = 1;
          gbc_pnl_Info.anchor = GridBagConstraints.CENTER;
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Main_With_Currency_Selection().add(get_pnl_Info(), gbc_pnl_Info)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_Main_With_Currency_Selection in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_Main_With_Currency_Selection;

    }
/*
 * ******************** */
    protected JPanel get_pnl_Head_With_Currency_Selection() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_Head_With_Currency_Selection == null) {
        try {
          pnl_Head_With_Currency_Selection = new JPanel();
          pnl_Head_With_Currency_Selection.setName("pnl_Head_With_Currency_Selection");
          pnl_Head_With_Currency_Selection.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_btn_CC = new GridBagConstraints();
          gbc_btn_CC.gridx = 0;
          gbc_btn_CC.gridy = 0;
          gbc_btn_CC.fill = GridBagConstraints.BOTH;
          gbc_btn_CC.weightx = 1;
          gbc_btn_CC.weighty = 1;
          gbc_btn_CC.gridheight = 2;
          gbc_btn_CC.anchor = GridBagConstraints.CENTER;

          gbc_btn_CC.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Head_With_Currency_Selection().add(get_btn_CC(), gbc_btn_CC)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_btn_Print = new GridBagConstraints();
          gbc_btn_Print.gridx = 1;
          gbc_btn_Print.gridy = 0;
          gbc_btn_Print.fill = GridBagConstraints.BOTH;
          gbc_btn_Print.weightx = 1;
          gbc_btn_Print.weighty = 1;
          gbc_btn_Print.gridheight = 2;
          gbc_btn_Print.anchor = GridBagConstraints.CENTER;

          gbc_btn_Print.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Head_With_Currency_Selection().add(get_btn_Print(), gbc_btn_Print)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_lbl_CurrencySelection = new GridBagConstraints();
          gbc_lbl_CurrencySelection.gridx = 2;
          gbc_lbl_CurrencySelection.gridy = 0;
          gbc_lbl_CurrencySelection.fill = GridBagConstraints.HORIZONTAL;
          gbc_lbl_CurrencySelection.weightx = 1;
          gbc_lbl_CurrencySelection.anchor = GridBagConstraints.LINE_START;
          gbc_lbl_CurrencySelection.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Head_With_Currency_Selection().add(get_lbl_CurrencySelection(),
                                                     gbc_lbl_CurrencySelection)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_combo_CurrencySelection = new GridBagConstraints();
          gbc_combo_CurrencySelection.gridx = 2;
          gbc_combo_CurrencySelection.gridy = 1;
          gbc_combo_CurrencySelection.fill = GridBagConstraints.HORIZONTAL;
          gbc_combo_CurrencySelection.weightx = 1;
          gbc_combo_CurrencySelection.anchor = GridBagConstraints.LINE_START;
          gbc_combo_CurrencySelection.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Head_With_Currency_Selection().add(get_combo_CurrencySelection(),
                                                     gbc_combo_CurrencySelection)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_lbl_HeadDate = new GridBagConstraints();
          gbc_lbl_HeadDate.gridx = 3;
          gbc_lbl_HeadDate.gridy = 0;
          gbc_lbl_HeadDate.fill = GridBagConstraints.HORIZONTAL;
          gbc_lbl_HeadDate.weightx = 1;
          gbc_lbl_HeadDate.anchor = GridBagConstraints.LINE_END;
          gbc_lbl_HeadDate.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Head_With_Currency_Selection().add(get_lbl_HeadDate(), gbc_lbl_HeadDate)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_lbl_HeadUser = new GridBagConstraints();
          gbc_lbl_HeadUser.gridx = 3;
          gbc_lbl_HeadUser.gridy = 1;
          gbc_lbl_HeadUser.fill = GridBagConstraints.HORIZONTAL;
          gbc_lbl_HeadUser.weightx = 1;
          gbc_lbl_HeadUser.anchor = GridBagConstraints.LINE_END;
          gbc_lbl_HeadUser.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Head_With_Currency_Selection().add(get_lbl_HeadUser(), gbc_lbl_HeadUser)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_Head_With_Currency_Selection in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_Head_With_Currency_Selection;

    }
/*
 * ******************** */
    protected JPanel get_pnl_Head() {
/* Auto-create the GUI-element if it does not already exist. */
      
if (pnl_Head == null) {
        try {
          pnl_Head = new JPanel();
          pnl_Head.setName("pnl_Head");
          pnl_Head.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          
GridBagConstraints gbc_btn_CC = new GridBagConstraints();
          gbc_btn_CC.gridx = 0;
          gbc_btn_CC.gridy = 0;
          gbc_btn_CC.fill = GridBagConstraints.BOTH;
          gbc_btn_CC.weightx = 1;
          gbc_btn_CC.weighty = 1;
          gbc_btn_CC.gridheight = 2;
          gbc_btn_CC.anchor = GridBagConstraints.CENTER;

          gbc_btn_CC.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Head().add(get_btn_CC(), gbc_btn_CC)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_btn_Print = new GridBagConstraints();
          gbc_btn_Print.gridx = 1;
          gbc_btn_Print.gridy = 0;
          gbc_btn_Print.fill = GridBagConstraints.BOTH;
          gbc_btn_Print.weightx = 1;
          gbc_btn_Print.weighty = 1;
          gbc_btn_Print.gridheight = 2;
          gbc_btn_Print.anchor = GridBagConstraints.CENTER;

          gbc_btn_Print.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Head().add(get_btn_Print(), gbc_btn_Print)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_lbl_HeadDate = new GridBagConstraints();
          gbc_lbl_HeadDate.gridx = 3;
          gbc_lbl_HeadDate.gridy = 0;
          gbc_lbl_HeadDate.fill = GridBagConstraints.HORIZONTAL;
          gbc_lbl_HeadDate.weightx = 1;
          gbc_lbl_HeadDate.anchor = GridBagConstraints.LINE_END;
          gbc_lbl_HeadDate.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Head().add(get_lbl_HeadDate(), gbc_lbl_HeadDate)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_lbl_HeadUser = new GridBagConstraints();
          gbc_lbl_HeadUser.gridx = 3;
          gbc_lbl_HeadUser.gridy = 1;
          gbc_lbl_HeadUser.fill = GridBagConstraints.HORIZONTAL;
          gbc_lbl_HeadUser.weightx = 1;
          gbc_lbl_HeadUser.anchor = GridBagConstraints.LINE_END;
          gbc_lbl_HeadUser.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Head().add(get_lbl_HeadUser(), gbc_lbl_HeadUser)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_Head in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_Head;

    }
/*
 * ******************** */
    protected JPanel get_pnl_Maintain() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_Maintain == null) {
        try {
          pnl_Maintain = new JPanel();
          pnl_Maintain.setName("pnl_Maintain");
          pnl_Maintain.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_Detail = new GridBagConstraints();
          gbc_pnl_Detail.gridx = 0;
          gbc_pnl_Detail.gridy = 0;
          gbc_pnl_Detail.fill = GridBagConstraints.HORIZONTAL;
          gbc_pnl_Detail.weightx = 0;
          gbc_pnl_Detail.anchor = GridBagConstraints.CENTER;
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Maintain().add(get_pnl_Detail(), gbc_pnl_Detail)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_List = new GridBagConstraints();
          gbc_pnl_List.gridx = 0;
          gbc_pnl_List.gridy = 1;
          gbc_pnl_List.fill = GridBagConstraints.BOTH;
          gbc_pnl_List.weightx = 1;
          gbc_pnl_List.anchor = GridBagConstraints.CENTER;
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Maintain().add(get_pnl_List(), gbc_pnl_List)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_Maintain in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_Maintain;

    }
/*
 * ******************** */
    protected JPanel get_pnl_Detail() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_Detail == null) {
        try {
          pnl_Detail = new JPanel();
          pnl_Detail.setName("pnl_Detail");
          pnl_Detail.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_DetailFields = new GridBagConstraints();
          gbc_pnl_DetailFields.gridx = 0;
          gbc_pnl_DetailFields.gridy = 0;
          gbc_pnl_DetailFields.fill = GridBagConstraints.BOTH;
          gbc_pnl_DetailFields.weightx = 1;
          gbc_pnl_DetailFields.anchor = GridBagConstraints.CENTER;
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Detail().add(get_pnl_DetailFields(), gbc_pnl_DetailFields);
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_DetailButtons = new GridBagConstraints();
          gbc_pnl_DetailButtons.gridx = 1;
          gbc_pnl_DetailButtons.gridy = 0;
          gbc_pnl_DetailButtons.fill = GridBagConstraints.BOTH;
          gbc_pnl_DetailButtons.weightx = 0;
          gbc_pnl_DetailButtons.anchor = GridBagConstraints.CENTER;
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Detail().add(get_pnl_DetailButtons(), gbc_pnl_DetailButtons)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_Detail in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_Detail;

    }
/*
 * ******************** */
    protected JPanel get_pnl_DetailFields() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_DetailFields == null) {
        try {
          pnl_DetailFields = new JPanel();
          pnl_DetailFields.setName("pnl_DetailFields");
          pnl_DetailFields.setLayout(new GridBagLayout());
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_DetailFields in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_DetailFields;

    }
/*
 * ******************** */
    protected JPanel get_pnl_DetailButtons() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_DetailButtons == null) {
        try {
          pnl_DetailButtons = new JPanel();
          pnl_DetailButtons.setName("pnl_DetailButtons");
          pnl_DetailButtons.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_btn_Store = new GridBagConstraints();
          gbc_btn_Store.gridx = 0;
          gbc_btn_Store.gridy = 0;
          gbc_btn_Store.fill = GridBagConstraints.BOTH;
          gbc_btn_Store.weightx = 1;
          gbc_btn_Store.weighty = 1;
          gbc_btn_Store.gridheight = 1;
          gbc_btn_Store.anchor = GridBagConstraints.CENTER;

          gbc_btn_Store.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_DetailButtons().add(get_btn_Store(), gbc_btn_Store)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_btn_Copy = new GridBagConstraints();
          gbc_btn_Copy.gridx = 0;
          gbc_btn_Copy.gridy = 1;
          gbc_btn_Copy.fill = GridBagConstraints.BOTH;
          gbc_btn_Copy.weightx = 1;
          gbc_btn_Copy.weighty = 1;
          gbc_btn_Copy.gridheight = 1;
          gbc_btn_Copy.anchor = GridBagConstraints.CENTER;

          gbc_btn_Copy.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_DetailButtons().add(get_btn_Copy(), gbc_btn_Copy)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_btn_Previous = new GridBagConstraints();
          gbc_btn_Previous.gridx = 0;
          gbc_btn_Previous.gridy = 2;
          gbc_btn_Previous.fill = GridBagConstraints.BOTH;
          gbc_btn_Previous.weightx = 1;
          gbc_btn_Previous.weighty = 1;
          gbc_btn_Previous.gridheight = 1;
          gbc_btn_Previous.anchor = GridBagConstraints.CENTER;

          gbc_btn_Previous.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_DetailButtons().add(get_btn_Previous(), gbc_btn_Previous)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_btn_Next = new GridBagConstraints();
          gbc_btn_Next.gridx = 0;
          gbc_btn_Next.gridy = 3;
          gbc_btn_Next.fill = GridBagConstraints.BOTH;
          gbc_btn_Next.weightx = 1;
          gbc_btn_Next.weighty = 1;
          gbc_btn_Next.gridheight = 1;
          gbc_btn_Next.anchor = GridBagConstraints.CENTER;

          gbc_btn_Next.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_DetailButtons().add(get_btn_Next(), gbc_btn_Next)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_DetailButtons in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_DetailButtons;

    }
/*
 * ******************** */
    protected JPanel get_pnl_List() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_List == null) {
        try {
          pnl_List = new JPanel();
          pnl_List.setName("pnl_List");
          pnl_List.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_ListFields = new GridBagConstraints();
          gbc_pnl_ListFields.gridx = 0;
          gbc_pnl_ListFields.gridy = 0;
          gbc_pnl_ListFields.fill = GridBagConstraints.BOTH;
          gbc_pnl_ListFields.weightx = 1;
          gbc_pnl_ListFields.anchor = GridBagConstraints.CENTER;
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_List().add(get_pnl_ListFields(), gbc_pnl_ListFields);
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_ListButtons = new GridBagConstraints();
          gbc_pnl_ListButtons.gridx = 1;
          gbc_pnl_ListButtons.gridy = 0;
          gbc_pnl_ListButtons.fill = GridBagConstraints.BOTH;
          gbc_pnl_ListButtons.weightx = 0;
          gbc_pnl_ListButtons.anchor = GridBagConstraints.CENTER;
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_List().add(get_pnl_ListButtons(), gbc_pnl_ListButtons)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_List in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_List;

    }
/*
 * ******************** */
    protected JPanel get_pnl_ListFields() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_ListFields == null) {
        try {
          pnl_ListFields = new JPanel();
          pnl_ListFields.setName("pnl_ListFields");
          pnl_ListFields.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_lbl_SelectionListHeader = new GridBagConstraints();
          gbc_lbl_SelectionListHeader.gridx = 0;
          gbc_lbl_SelectionListHeader.gridy = 97;
          gbc_lbl_SelectionListHeader.fill = GridBagConstraints.NONE ;
          gbc_lbl_SelectionListHeader.weightx = 1;
          gbc_lbl_SelectionListHeader.anchor = GridBagConstraints.LINE_START;
          gbc_lbl_SelectionListHeader.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_ListFields().add(get_lbl_SelectionListHeader(), gbc_lbl_SelectionListHeader)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_pnl_SelectionList = new GridBagConstraints();
          gbc_pnl_SelectionList.gridx = 0;
          gbc_pnl_SelectionList.gridy = 98;
          gbc_pnl_SelectionList.fill = GridBagConstraints.BOTH ;
          gbc_pnl_SelectionList.weightx = 1;
          gbc_pnl_SelectionList.weighty = 1;
          gbc_pnl_SelectionList.anchor = GridBagConstraints.CENTER;

          gbc_pnl_SelectionList.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_ListFields().add(get_pnl_SelectionList(), gbc_pnl_SelectionList)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_lbl_Selection = new GridBagConstraints();
          gbc_lbl_Selection.gridx = 0;
          gbc_lbl_Selection.gridy = 99;
          gbc_lbl_Selection.fill = GridBagConstraints.NONE ;
          gbc_lbl_Selection.weightx = 1;
          gbc_lbl_Selection.anchor = GridBagConstraints.LINE_END;
          gbc_lbl_Selection.insets = new Insets(3,3,3,35);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_ListFields().add(get_lbl_Selection(), gbc_lbl_Selection)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_txt_Selection = new GridBagConstraints();
          gbc_txt_Selection.gridx = 0;
          gbc_txt_Selection.gridy = 99;
          gbc_txt_Selection.fill = GridBagConstraints.NONE;
          gbc_txt_Selection.weightx = 0;
          gbc_txt_Selection.anchor = GridBagConstraints.LINE_END;
          gbc_txt_Selection.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_ListFields().add(get_txt_Selection(), gbc_txt_Selection)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_ListFields in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_ListFields;

    }
/*
 * ******************** */
    protected JPanel get_pnl_ListButtons() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_ListButtons == null) {
        try {
          pnl_ListButtons = new JPanel();
          pnl_ListButtons.setName("pnl_ListButtons");
          pnl_ListButtons.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_btn_Get = new GridBagConstraints();
          gbc_btn_Get.gridx = 0;
          gbc_btn_Get.gridy = 0;
          gbc_btn_Get.fill = GridBagConstraints.BOTH;
          gbc_btn_Get.weightx = 1;
          gbc_btn_Get.weighty = 1;
          gbc_btn_Get.gridheight = 1;
          gbc_btn_Get.anchor = GridBagConstraints.CENTER;

          gbc_btn_Get.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_ListButtons().add(get_btn_Get(), gbc_btn_Get);
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_btn_Delete = new GridBagConstraints();
          gbc_btn_Delete.gridx = 0;
          gbc_btn_Delete.gridy = 1;
          gbc_btn_Delete.fill = GridBagConstraints.BOTH;
          gbc_btn_Delete.weightx = 1;
          gbc_btn_Delete.weighty = 1;
          gbc_btn_Delete.gridheight = 1;
          gbc_btn_Delete.anchor = GridBagConstraints.CENTER;

          gbc_btn_Delete.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_ListButtons().add(get_btn_Delete(), gbc_btn_Delete)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_ListButtons in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_ListButtons;

    }
/*
 * ******************** */
    protected JPanel get_pnl_Info() {
/* Auto-create the GUI-element if it does not already exist. */
      
if (
pnl_Info == null) {
        try {
          pnl_Info = new JPanel();
          pnl_Info.setName("pnl_Info");
          pnl_Info.setLayout(new GridBagLayout());
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_lbl_InfoMessage = new GridBagConstraints();
          gbc_lbl_InfoMessage.gridx = 0;
          gbc_lbl_InfoMessage.gridy = 0;
          gbc_lbl_InfoMessage.fill = GridBagConstraints.HORIZONTAL;
          gbc_lbl_InfoMessage.weightx = 1;
          gbc_lbl_InfoMessage.anchor = GridBagConstraints.LINE_START;
          gbc_lbl_InfoMessage.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Info().add(get_lbl_InfoMessage(), gbc_lbl_InfoMessage)
;
/*
 * Define GridBagConstraints for the element to be added. */
          GridBagConstraints gbc_btn_InfoLight = new GridBagConstraints();
          gbc_btn_InfoLight.gridx = 1;
          gbc_btn_InfoLight.gridy = 0;
          gbc_btn_InfoLight.fill = GridBagConstraints.NONE;
          gbc_btn_InfoLight.weightx = 0;
          gbc_btn_InfoLight.anchor = GridBagConstraints.LINE_END;
          gbc_btn_InfoLight.insets = new Insets(3,3,3,3);
/* Add the element to the panel; element-position is controlled by GridBagConstraints. */
          get_pnl_Info().add(get_btn_InfoLight(), gbc_btn_InfoLight)
;
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_Info in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_Info;

    }
/*
 * ******************** */
    public JButton get_btn_CC() {
/* Auto-create the GUI-element if it does not already exist. */
      
if (btn_CC == null) {
        try {
          btn_CC = new JButton();
          btn_CC.setName("btn_CC");
          btn_CC.setActionCommand("btn_CC");
          btn_CC.addActionListener(this);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building btn_CC in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return btn_CC;

    }
/*
 * ******************** */
    public JButton get_btn_Print() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(btn_Print == null) {
        try {
          btn_Print = new JButton();
          btn_Print.setName("btn_Print");
          btn_Print.setActionCommand("btn_Print ");
          btn_Print.addActionListener(this);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building btn_Print in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return btn_Print;

    }
/*
 * ******************** */
    public JLabel get_lbl_CurrencySelection() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(lbl_CurrencySelection == null) {
        try {
          lbl_CurrencySelection = new JLabel();
          lbl_CurrencySelection.setName("lbl_CurrencySelection");
          lbl_CurrencySelection.setText(". . . . . . ");
        }
        catch (Throwable Exc) {
          System.out.println("Error while building lbl_CurrencySelection in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return lbl_CurrencySelection;

    }
/*
 * ******************** */
    public JComboBox get_combo_CurrencySelection() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(combo_CurrencySelection == null) {
        try {
          combo_CurrencySelection = new JComboBox();
          combo_CurrencySelection.setName("combo_CurrencySelection");
        }
        catch (Throwable Exc) {
          System.out.println("Error while building combo_CurrencySelection in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return combo_CurrencySelection;

    }
/*
 * ******************** */
    public JLabel get_lbl_HeadDate() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(lbl_HeadDate == null) {
        try {
          lbl_HeadDate = new JLabel();
          lbl_HeadDate.setName("lbl_HeadDate");
          lbl_HeadDate.setText(". . . . . . ");
          lbl_HeadDate.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building lbl_HeadDate in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return lbl_HeadDate;

    }
/*
 * ******************** */
    public JLabel get_lbl_HeadUser() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(lbl_HeadUser == null) {
        try {
          lbl_HeadUser = new JLabel();
          lbl_HeadUser.setName("lbl_HeadUser");
          lbl_HeadUser.setText(". . . . . . ");
          lbl_HeadUser.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building lbl_HeadUser in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return lbl_HeadUser;

    }
/*
 * ******************** */
    public JButton get_btn_Store() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(btn_Store == null) {
        try {
          btn_Store = new JButton();
          btn_Store.setName("btn_Store");
          btn_Store.setActionCommand("btn_Store");
          btn_Store.addActionListener(this);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building btn_Store in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return btn_Store;

    }
/*
 * ******************** */
    public JButton get_btn_Copy() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(btn_Copy == null) {
        try {
          btn_Copy = new JButton();
          btn_Copy.setName("btn_Copy");
          btn_Copy.setActionCommand("btn_Copy");
          btn_Copy.addActionListener(this);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building btn_Copy in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return btn_Copy;

    }
/*
 * ******************** */
    public JButton get_btn_Previous() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(btn_Previous == null) {
        try {
          btn_Previous = new JButton();
          btn_Previous.setName("btn_Previous");
          btn_Previous.setActionCommand("btn_Previous");
          btn_Previous.addActionListener(this);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building btn_Previous in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return btn_Previous;

    }
/*
 * ******************** */
    public JButton get_btn_Next() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(btn_Next == null) {
        try {
          btn_Next = new JButton();
          btn_Next.setName("btn_Next");
          btn_Next.setActionCommand("btn_Next");
          btn_Next.addActionListener(this);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building btn_Next in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return btn_Next;

    }
/*
 * ******************** */
    public JLabel get_lbl_SelectionListHeader() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(lbl_SelectionListHeader == null) {
        try {
          lbl_SelectionListHeader = new JLabel();
          lbl_SelectionListHeader.setName("lbl_SelectionListHeader");
          lbl_SelectionListHeader.setText(". . . . . . ");
        }
        catch (Throwable Exc) {
          System.out.println("Error while building lbl_SelectionListHeader in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return lbl_SelectionListHeader;

    }
/*
 * ******************** */
    public JScrollPane get_pnl_SelectionList() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_SelectionList == null) {
        try {
          pnl_SelectionList = new JScrollPane();
          pnl_SelectionList.setName("pnl_SelectionList");
          pnl_SelectionList.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
          pnl_SelectionList.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
          pnl_SelectionList.setViewportView(get_pnl_SelectionListTable());
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_SelectionList in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_SelectionList;

    }
/*
 * ******************** */
    public JTable get_pnl_SelectionListTable() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_SelectionListTable == null) {
        try {
          pnl_SelectionListTable = new JTable();
          pnl_SelectionListTable.setName("pnl_SelectionListTable");
          pnl_SelectionListTable.setColumnModel(get_pnl_SelectionListTableDefaultTableColumnModel());
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_SelectionListTable in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_SelectionListTable;

    }
/*
 * ******************** */
    public DefaultTableColumnModel get_pnl_SelectionListTableDefaultTableColumnModel() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(pnl_SelectionListTableDefaultTableColumnModel == null) {
        try {
/* Construct a ListSelectionModel which is needed for the ColumnModel
 * and allow the column-width to be variable. */
          DefaultListSelectionModel locDefaultListSelectionModel = new DefaultListSelectionModel();
          locDefaultListSelectionModel.setValueIsAdjusting(true);

/* */
          pnl_SelectionListTableDefaultTableColumnModel = new DefaultTableColumnModel();
          pnl_SelectionListTableDefaultTableColumnModel .setSelectionModel(locDefaultListSelectionModel);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building pnl_SelectionListTableDefaultTableColumnModel in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return pnl_SelectionListTableDefaultTableColumnModel;

    }
/*
 * ******************** */
    public JLabel get_lbl_Selection() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(lbl_Selection == null) {
        try {
          lbl_Selection = new JLabel();
          lbl_Selection.setName("lbl_Selection");
          lbl_Selection.setText(". . . . . . ");
          lbl_Selection.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building lbl_Selection in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return lbl_Selection;

    }
/*
 * ******************** */
    public JTextField get_txt_Selection() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(txt_Selection == null) {
        try {
          txt_Selection = new JTextField();
          txt_Selection.setName("txt_Selection");
          txt_Selection.setMinimumSize(new Dimension(30, 20));
        }
        catch (Throwable Exc) {
          System.out.println("Error while building txt_Selection in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return txt_Selection;

    }
/*
 * ******************** */
    public JButton get_btn_Get() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(btn_Get == null) {
        try {
          btn_Get = new JButton();
          btn_Get.setName("btn_Get");
          btn_Get.setActionCommand("btn_Get");
          btn_Get.addActionListener(this);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building btn_Get in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return btn_Get;

    }
/*
 * ******************** */
    public JButton get_btn_Delete() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(btn_Delete == null) {
        try {
          btn_Delete = new JButton();
          btn_Delete.setName("btn_Delete");
          btn_Delete.setActionCommand("btn_Delete");
          btn_Delete.addActionListener(this);
        }
        catch (Throwable Exc) {
          System.out.println("Error while building btn_Delete in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return btn_Delete;

    }
/*
 * ******************** */
    public JLabel get_lbl_InfoMessage() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(lbl_InfoMessage == null) {
        try {
          lbl_InfoMessage = new JLabel();
          lbl_InfoMessage.setName("lbl_InfoMessage");
          lbl_InfoMessage.setText(". . . . . . ");
        }
        catch (Throwable Exc) {
          System.out.println("Error while building lbl_InfoMessage in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return lbl_InfoMessage;

    }
/*
 * ******************** */
    public JButton get_btn_InfoLight() {
/* Auto-create the GUI-element if it does not already exist. */
      
if
(btn_InfoLight == null) {
        try {
          btn_InfoLight = new JButton();
          btn_InfoLight.setName("btn_InfoLight");
        }
        catch (Throwable Exc) {
          System.out.println("Error while building btn_InfoLight in class JSBS_TaskFrame");
          Exc.printStackTrace();
        }
      }
      return btn_InfoLight;

    }
/*
 * -------------------------------
 * Method that is requiered together with the interface ActionHandler.
 * This method has to be overwritten in the derived class. */
    
public void actionPerformed(ActionEvent e) {
    }

/*
 * -------------------------------
 * Methods that are requiered together with the interface KeyListener.
 * It is only necessary to react to 'keyPressed' in the derived class. */
    public void keyPressed(KeyEvent e) {
    }

    
public
void keyReleased(KeyEvent e) {
    }

    
public
void keyTyped(KeyEvent e) {
    }

/*
 * -------------------------------
 * Methods that are requiered together with the interface FocusListener.
 * These methods have to be overwritten in the derived class. */
    public void focusGained(FocusEvent e) {
    }
    public void focusLost(FocusEvent e) {
    }
/*
 * -------------------------------
 * Method that adds KeyListener, FocusListener and DocumentListener to a GUI-element and
 * all its components.
 * If this method is called from a TaskFrame (a derivation of this class),
 * then the ContentPane of the JFrame (usually the overwritten 'MainPanel')
 * is passed as 'Container'-parameter.
 * This method inspects each 'Container' for components and calls itself if there are one.
 *
 * The parameter 'DocumentListener' allows to attach a DocumentListener to JTextComponents.
 * Then the methods 'changedUpdate', insertUpdate' or 'removedUpdate' (implemented in
 * the class that is passed as parameter) are called when the text of a JTextComponent changes. */
    protected void addListeners(Container parmContainer, DocumentListener parmDocumentListener) {
/*
 * If the 'Container' is a JTextComponent and a 'DocumentListener' is passed,
 * then the 'DocumentListener' is added to the 'Container'. */
      if ((parmContainer instanceof JTextComponent) && (parmDocumentListener != null)) {
/* Classify the 'Container' as JTextComponent to be able to add the DocumentListener. */
        JTextComponent locJTextComponent = (JTextComponent) parmContainer;
/* Get the 'Document' (the component that is responsible for the text) from
 * the JTextComponent and add the DocumentListener. */
        locJTextComponent.getDocument().addDocumentListener(parmDocumentListener);
      }

/*
 * KeyListener and FocusListener are added to any class of a GUI-element. */
      parmContainer.addKeyListener(this);
      parmContainer.addFocusListener(this);
/*
 * Inspect if the 'Container' has components in it. If there are components
 * within this 'Container', call this method recursively for each of it. */
      Component comps[] = parmContainer.getComponents();
      for(int i = 0; i < comps.length; i++) {
        Component comp = comps[i];
        addListeners((Container) comp, parmDocumentListener);
      }

    }
}