=== modified file 'src/com/goldencode/p2j/ui/BaseEntity.java'
--- old/src/com/goldencode/p2j/ui/BaseEntity.java	2021-11-18 16:18:02 +0000
+++ new/src/com/goldencode/p2j/ui/BaseEntity.java	2022-02-09 11:52:13 +0000
@@ -186,6 +186,7 @@
 **                           The setHeightImpl() method introduced to do the stuff after the input is properly validated
 **                           and converted to integer. See #5345.
 **     VVT 20211118          Fixed: incorrect coordinate conversion when setting size atributes. See #5034-1422.
+**     ME  20220209          Replace getAttr for "realized" with isRealized method.
 */
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -2514,7 +2515,7 @@
          // config stores 0-based value
          value = value < 0 ? value + 1 : value - 1;
          
-         if (!getAttr("realized", () -> config.realized, true) || isInsideSetup)
+         if (!_isRealized() || isInsideSetup)
          {
             config.initRow = value;
             config.initY = y;
@@ -2591,7 +2592,7 @@
          // config stores 0-based value
          value = value < 0 ? value + 1 : value - 1;
          
-         if (!getAttr("realized", () -> config.realized, true) || isInsideSetup)
+         if (!_isRealized() || isInsideSetup)
          {
             config.initColumn = value;
             config.initX = x;
@@ -2714,7 +2715,7 @@
             chValue = Coordinate.adjustMinMaxGuiChar(chValue);
          }
          
-         if (!getAttr("realized", () -> config.realized, true) || isInsideSetup)
+         if (!_isRealized() || isInsideSetup)
          {
             config.initX = value;
             config.initColumn = chValue;
@@ -2745,7 +2746,7 @@
             chValue = Coordinate.adjustMinMaxGuiChar(chValue);
          }
          
-         if (!getAttr("realized", () -> config.realized, true) || isInsideSetup)
+         if (!_isRealized() || isInsideSetup)
          {
             config.initY = value;
             config.initRow = chValue;
@@ -2874,7 +2875,7 @@
       // TO-DO:
       // value > screen-width - frame-width should produce PROGRESS error 4054
       // "**Unable to set COL.  FRAME f does not fit in WINDOW widget. (4054)"
-      if (!validColumnOrRow(isUnknown, value, row) && getAttr("realized", () -> config.realized, true))
+      if (!validColumnOrRow(isUnknown, value, row) && _isRealized())
       {
          // if the widget was already realized and this is not a valid coordinate, do nothing
          return;

=== modified file 'src/com/goldencode/p2j/ui/BrowseColumnWidget.java'
--- old/src/com/goldencode/p2j/ui/BrowseColumnWidget.java	2022-01-24 12:13:02 +0000
+++ new/src/com/goldencode/p2j/ui/BrowseColumnWidget.java	2022-02-09 11:52:55 +0000
@@ -154,6 +154,7 @@
 **     CA  20220106          PUBLISH arguments must be evaluated only if the subscription is found.
 **     SBI 20220118          Fixed NPE when adding new dynamic column.
 **     AL2 20220124          Consider any screen-value as valid in regard to ControlSetEntity.setScreenValue
+**     ME  20220209          Replace getAttr for "realized" with isRealized method.
 */
 
 /*
@@ -2891,7 +2892,7 @@
       // check if we need to freeze the width of the current column
       BrowseWidget bw = getBrowse();
       boolean fixedWidth = bw != null &&
-                           getAttr("realized", () -> config.realized) &&
+                           _isRealized() &&
                            getAttr("fitLastColumn", () -> bw.config.fitLastColumn) &&
                            isLastVisibleColumn();
       if (fixedWidth)

=== modified file 'src/com/goldencode/p2j/ui/BrowseWidget.java'
--- old/src/com/goldencode/p2j/ui/BrowseWidget.java	2022-01-18 23:32:13 +0000
+++ new/src/com/goldencode/p2j/ui/BrowseWidget.java	2022-02-09 11:53:50 +0000
@@ -363,6 +363,7 @@
 **     VVT 20220115          System-wide warningAlreadyRealized() method is now used to handle attempts to
 **                           set attribute of a realized widget. See also #5937-32.
 **     OM  20220118          Do not count skipped rows with unavailable records.
+**     ME  20220209          Replace getAttr for "realized" with isRealized method.
 */
 
 /*
@@ -1014,7 +1015,7 @@
    @Override
    public void setLabels(boolean labels)
    {
-      if (getAttr("realized", () -> config.realized, true) && LogicalTerminal.isChui())
+      if (_isRealized() && LogicalTerminal.isChui())
       {
          warningAlreadyRealized("LABELS");
          return;
@@ -2322,8 +2323,7 @@
    @Override
    public integer visibleIterations()
    {
-      boolean realized = getAttr("realized", () -> config.realized, true);
-      if (!realized)
+      if (!_isRealized())
       {
          return new integer();
       }
@@ -4471,7 +4471,7 @@
       }
       else                            // ChUI behavior depends on whether realized or not
       {
-         if (!getAttr("realized", () -> config.realized, true))        // Unrealized, always ? (unknown)
+         if (!_isRealized())        // Unrealized, always ? (unknown)
          {
             return new integer();
          }
@@ -4587,7 +4587,7 @@
       }
       else                            // ChUI, 0 before being realized, ? (unknown) after
       {
-         return (!getAttr("realized", () -> config.realized, true)) ? new integer(0) : new integer();
+         return (!_isRealized()) ? new integer(0) : new integer();
       }
    }
 
@@ -8697,7 +8697,7 @@
          return false;
       }
 
-      if (getAttr("realized", () -> config.realized, true) && LogicalTerminal.isChui())
+      if (_isRealized() && LogicalTerminal.isChui())
       {
          warningAlreadyRealized("WIDTH");
          return false;
@@ -8727,7 +8727,7 @@
          return false;
       }
 
-      if (getAttr("realized", () -> config.realized, true) && LogicalTerminal.isChui())
+      if (_isRealized() && LogicalTerminal.isChui())
       {
          warningAlreadyRealized(pixels ? "HEIGHT-PIXELS" : "HEIGHT");
          return false;

=== modified file 'src/com/goldencode/p2j/ui/ComboBoxWidget.java'
--- old/src/com/goldencode/p2j/ui/ComboBoxWidget.java	2022-02-05 16:24:08 +0000
+++ new/src/com/goldencode/p2j/ui/ComboBoxWidget.java	2022-02-09 11:55:22 +0000
@@ -91,6 +91,7 @@
 **     AL2 20220122          Allow set of unknown value to simple and drop-down modes.
 **         20220124          Moved screen-value validity check in ControlSetEntity.
 **         20220204          Extend screen-value validation to update the value same as in 4GL.
+**     ME  20220209          Screen-value validation, replace getAttr for "realized" with isRealized method.
 */ 
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -638,7 +639,7 @@
    @Override
    public integer getInnerLines()
    {
-      if (!getAttr("realized", () -> config.realized, true))
+      if (!_isRealized())
       {
          return new integer(0);
       }
@@ -1346,6 +1347,7 @@
       // 2. in case of list-items, the 'label' must be the formatted value
       
       Class<?> cls = BaseDataType.fromTypeName(config.dataType);
+      ComboBoxConfig.Mode mode = getAttr("mode", () -> config.mode);
       
       String fmt = resolveFormat();
       for (ControlSetItem item : items)
@@ -1354,19 +1356,23 @@
          
          BaseDataType value = item.getValue();
          
-         BaseDataType newValue = BaseDataType.generateDefault(cls);
-         newValue.assign(value);
-
-         if (value.getTypeName().equals(config.dataType))
+         if (!value.getClass().equals(cls))
          {
-            continue;
+            BaseDataType newValue = BaseDataType.generateDefault(cls);
+            newValue.assign(value);
+            
+            item.setValue(newValue);
          }
          
-         item.setValue(newValue);
+         // drop-down-list trims trailing spaces and 
+         if (character.class.equals(cls) && mode == DROP_DOWN_LIST)
+         {
+            item.setValue(TextOps.rightTrim(new character(item.getValue().toString(fmt))));
+         }
          
          if (pairs == null || !pairs)
          {
-            item.setLabel(new character(newValue.toString(fmt)));
+            item.setLabel(item.getCharacterValue());
          }
       }
 
@@ -1675,29 +1681,25 @@
    {
       if (super.validateScreenValue(value))
       {
-         // if valid update the screen-value 
-         if (value.isUnknown())
-         {
-            // looks like when unknown it tries to find an empty item first
-            value.assign("");
-         }
+         // looks like when unknown it tries to find an empty item first
+         character lookup = value.isUnknown() ? new character("") : value;
          
          ControlSetItem[] items = getAttr("items", () -> config.items);
          
          for (ControlSetItem item : items)
          {
             // item found, update value if different case
-            if (CompareOps._isEqual(value, item.getCharacterValue()))
+            if (CompareOps._isEqual(lookup, item.getValue()))
             {
-               value.assign(item.getCharacterValue());
-               return true;
+               value.assign(item.getValue());
+               break;
             }
          }
          
-         // if value is empty and no matching item found reset to unknown
-         if (TextOps.isEmpty(value))
+         // always right-trim unless unknown
+         if (!value.isUnknown())
          {
-            value.setUnknown();
+            value.assign(TextOps.rightTrim(value));
          }
          
          return true;

=== modified file 'src/com/goldencode/p2j/ui/ControlSetEntity.java'
--- old/src/com/goldencode/p2j/ui/ControlSetEntity.java	2022-02-05 16:24:08 +0000
+++ new/src/com/goldencode/p2j/ui/ControlSetEntity.java	2022-02-09 11:56:00 +0000
@@ -97,6 +97,7 @@
 **     AL2 20220124          Make all control set entities to check for screen-value validity.
 **     ME  20220201          Allow for multiple values list when setting screen-value (delimiter is used).
 **     ME  20220202          Do not split value using delimiter on validateScreenValue - only selection-list
+**     ME  20220209          Replace getAttr for "realized" with isRealized method.
 */
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -1575,7 +1576,7 @@
          return;
       }
 
-      setListItemPairsWorker(list, getAttr("realized", () -> config.realized, true));
+      setListItemPairsWorker(list, _isRealized());
    }
    
    /**
@@ -2959,7 +2960,7 @@
 
       return Boolean.TRUE.equals(pairs) ? Boolean.TRUE :
          !getAttr("itemsSetWhenRealized", () -> config.itemsSetWhenRealized) &&
-         !getAttr("realized", () -> config.realized, true) &&
+         !_isRealized() &&
          items != null && items.length > 0 ? pairs : null;
    }
 

=== modified file 'src/com/goldencode/p2j/ui/FrameWidget.java'
--- old/src/com/goldencode/p2j/ui/FrameWidget.java	2022-01-15 22:16:32 +0000
+++ new/src/com/goldencode/p2j/ui/FrameWidget.java	2022-02-09 11:56:45 +0000
@@ -187,6 +187,7 @@
 **     CA  20221112          Fixed width/height-chars in ChUI mode - these must not be translated from pixels.
 **     VVT 20220115          System-wide warningAlreadyRealized() method is now used to handle attempts to
 **                           set attribute of a realized widget. See also #5937-32.
+**     ME  20220209          Replace getAttr for "realized" with isRealized method.
 */
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -663,7 +664,7 @@
          return;
       }
 
-      if (getAttr("realized", () -> config.realized, true) &&
+      if (_isRealized() &&
             btn.getAttr("frameId", () -> btn.config.frameId) == -1)
       {
          ErrorManager.recordOrShowError(4040, 
@@ -758,7 +759,7 @@
          return;
       }
 
-      if (getAttr("realized", () -> config.realized, true)
+      if (_isRealized()
             && btn.getAttr("frameId", () -> btn.config.frameId) == -1)
       {
          ErrorManager.recordOrShowError(4040, 
@@ -1406,7 +1407,7 @@
       // save this, as it will be overwritten by the super call
       GenericFrame owner = this.frame;
 
-      if (owner != null && getAttr("realized", () -> config.realized, true))
+      if (owner != null && _isRealized())
       {
          ErrorManager.recordOrShowError(4078,
                   String.format(
@@ -1976,7 +1977,7 @@
       // remove the frame, etc
       frame.frameCleanup();
       
-      if (dynamic || !getAttr("realized", () -> config.realized, true))
+      if (dynamic || !_isRealized())
       {
          LogicalTerminal.deregisterFrame(getId());
       }
@@ -2296,7 +2297,7 @@
    {
       if (!LogicalTerminal.isChui())  // GUI behavior depends on whether realized or not
       {
-         if (!getAttr("realized", () -> config.realized, true))        // Unrealized frame/dialog, always 0 
+         if (!_isRealized())        // Unrealized frame/dialog, always 0 
          {
             return new integer(0);
          }
@@ -2338,7 +2339,7 @@
       }
       else                            // ChUI behavior depends on whether realized or not
       {
-         if (!getAttr("realized", () -> config.realized, true))        // Unrealized frame/dialog, NOP
+         if (!_isRealized())        // Unrealized frame/dialog, NOP
          {
             return;
          }
@@ -2367,7 +2368,7 @@
       }
       else                            // ChUI behavior depends on whether realized or not
       {
-         if (!getAttr("realized", () -> config.realized, true))        // Unrealized frame/dialog   
+         if (!_isRealized())        // Unrealized frame/dialog   
          {
             return new integer(0);    // Always 0
          }
@@ -2409,7 +2410,7 @@
       }
       else                            // ChUI behavior depends on whether realized or not
       {
-         if (!getAttr("realized", () -> config.realized, true))        // Unrealized frame/dialog
+         if (!_isRealized())        // Unrealized frame/dialog
          {
             if (!isDialogBox())       // Frame, NOP
             {
@@ -2437,7 +2438,7 @@
    {
       if (!LogicalTerminal.isChui())  // GUI behavior depends on whether realized or not
       {
-         if (!getAttr("realized", () -> config.realized, true))        // Unrealized frame/dialog, always 0 
+         if (!_isRealized())        // Unrealized frame/dialog, always 0 
          {
             return new integer(0);
          }
@@ -2479,7 +2480,7 @@
       }
       else                            // ChUI behavior depends on whether realized or not
       {
-         if (!getAttr("realized", () -> config.realized, true))        // Unrealized frame/dialog 
+         if (!_isRealized())        // Unrealized frame/dialog 
          {
             return;
          }
@@ -2504,7 +2505,7 @@
       }
       else                            // ChUI behavior depends on whether realized or not
       {
-         if (!getAttr("realized", () -> config.realized, true))        // Unrealized frame/dialog   
+         if (!_isRealized())        // Unrealized frame/dialog   
          {
             // 0 unless 4GL is earlier than 11.x, then ? (unknown)                              
             boolean useZero = EnvironmentOps.versionNumber() >= 11.0f;
@@ -2548,7 +2549,7 @@
       }
       else                            // ChUI behavior depends on whether realized or not
       {
-         if (!getAttr("realized", () -> config.realized, true))        // Unrealized frame/dialog, NOP
+         if (!_isRealized())        // Unrealized frame/dialog, NOP
          {
             return;
          }
@@ -3108,7 +3109,7 @@
          //     by the runtime
          //   - frame is realized: the new value is ignored
          
-         if (getAttr("realized", () -> config.realized, true))
+         if (_isRealized())
          {
             return;
          }

=== modified file 'src/com/goldencode/p2j/ui/GenericFrame.java'
--- old/src/com/goldencode/p2j/ui/GenericFrame.java	2022-01-21 18:39:58 +0000
+++ new/src/com/goldencode/p2j/ui/GenericFrame.java	2022-02-09 11:57:33 +0000
@@ -943,6 +943,7 @@
 **     SVL 20220107          Partially reverted previous entry.
 **     ME  20220110          Screen value is unknown only for combo/selection list if not in list.
 **     AL2 20220121          Moved combo/selsection screen-value conditional after core frame buffer checking
+**     ME  20220209          Replace getAttr for "realized" with isRealized method.
 */
 
 /*
@@ -1472,7 +1473,7 @@
     */
    public logical validateFields(boolean enabledOnly)
    {
-      if (!frame.getAttr("realized", () -> frame.config.realized, true))
+      if (!frame._isRealized())
       {
          return new logical(true);
       }
@@ -6233,7 +6234,7 @@
    @Override
    public void setDown(Resolvable down)
    {
-      if (frame.getAttr("realized", () -> frame.config.realized, true))
+      if (frame._isRealized())
       {
          // this is a no-op in case of shared frames - the DOWN value is inherited from the source
          // frame.  DOWN can only be overridden by explicitly setting the FRAME's DOWN attribute

=== modified file 'src/com/goldencode/p2j/ui/GenericWidget.java'
--- old/src/com/goldencode/p2j/ui/GenericWidget.java	2022-01-15 22:16:32 +0000
+++ new/src/com/goldencode/p2j/ui/GenericWidget.java	2022-02-09 11:17:15 +0000
@@ -333,6 +333,7 @@
 **     VVT 20211215          New methods added: setX(int), setY(int). See #5899.
 **     VVT 20220115          System-wide warningAlreadyRealized(String) method was added to handle attempts to
 **                           set attribute of a realized widget. See also #5937-32.
+**     ME  20220208          Use 'realized' instead of temporary 'wasRealized' configuration flag. 
 */
 
 /*
@@ -1474,7 +1475,7 @@
       }
 
       // check if the parent frame is set and not visible
-      if (!getAttr("realized", () -> config.realized, true) &&
+      if (!_isRealized() &&
           (frame == null || !frame.getFrameWidget()._isVisible()))
       {
          config.hidden = hidden;
@@ -5990,7 +5991,7 @@
    @Override
    public void realize()
    {
-      if (getAttr("wasRealized", () -> config.wasRealized, true))
+      if (_isRealized())
       {
          return;
       }
@@ -6007,7 +6008,7 @@
        *  A temporary solution. Most likely should be revised
        *  after a proper realization of the realize() method, 
        */
-      config.wasRealized = true;
+      config.realized = true;
       // TODO: implement
    }
    
@@ -6115,7 +6116,7 @@
       {
          return true;
       }
-      if (!getAttr("wasRealized", () -> config.wasRealized, true))
+      if (!_isRealized())
       {
          ErrorManager.recordOrShowError(4104, 
                String.format(

=== modified file 'src/com/goldencode/p2j/ui/SelectionListWidget.java'
--- old/src/com/goldencode/p2j/ui/SelectionListWidget.java	2022-02-03 09:10:33 +0000
+++ new/src/com/goldencode/p2j/ui/SelectionListWidget.java	2022-02-09 11:58:57 +0000
@@ -58,6 +58,7 @@
 **     AL2 20220124          Check screen-value validity through ControlSetEntity.
 **     ME  20220201          Handle multiple values list in set screen-value.
 **     ME  20220202          Split value using delimiter on validateScreenValue.
+**     ME  20220209          Replace getAttr for "realized" with isRealized method.
 */
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -752,7 +753,7 @@
    @Override
    public void setListItemPairs(character list)
    {
-      if (!getAttr("realized", () -> config.realized, true))
+      if (!_isRealized())
       {
          super.setListItemPairs(list);
       }

=== modified file 'src/com/goldencode/p2j/ui/TextBasedWidget.java'
--- old/src/com/goldencode/p2j/ui/TextBasedWidget.java	2021-09-17 06:34:57 +0000
+++ new/src/com/goldencode/p2j/ui/TextBasedWidget.java	2022-02-09 11:59:30 +0000
@@ -14,6 +14,7 @@
 **     CA  20210709 Dynamic side-labels are part of the FIELD-GROUP in FWD, too - so they must not be walked 
 **                  explicitly.
 **     CA  20210917 Javadoc fixes.
+**     ME  20220209 Replace getAttr for "realized" with isRealized method.
 */
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -393,7 +394,7 @@
       String name = getAttr("name", () -> config.name);
 
       // if the literal is not yet realized, compute its width
-      if (!getAttr("realized", () -> config.realized) && name != null && getAttr("align", () -> config.align) == ControlEntity.ALIGN_RIGHT)
+      if (!_isRealized() && name != null && getAttr("align", () -> config.align) == ControlEntity.ALIGN_RIGHT)
       {
          if (name.length() > col - 1)
          {

=== modified file 'src/com/goldencode/p2j/ui/ToggleBoxWidget.java'
--- old/src/com/goldencode/p2j/ui/ToggleBoxWidget.java	2021-12-01 22:36:02 +0000
+++ new/src/com/goldencode/p2j/ui/ToggleBoxWidget.java	2022-02-09 12:00:06 +0000
@@ -39,6 +39,7 @@
 **                  within FWD code (see COMBO-BOX:LIST-ITEM-PAIRS behavior).
 **     CA  20210217 DATA-TYPE attribute is not settable for this widget.
 ** 020 HC  20211201 Implemented TREENODE:CHECKED attribute.
+**     ME  20220209 Replace getAttr for "realized" with isRealized method.
 */
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -196,7 +197,7 @@
    @Override
    public logical isChecked()
    {
-      if (!getAttr("realized", () -> config.realized, true))
+      if (!_isRealized())
       {
          // the toggle box can be checked even if not realized
          return new logical(getAttr("checked", () -> config.checked));
@@ -258,7 +259,7 @@
          return;
       }
       
-      if (getAttr("realized", () -> config.realized, true))
+      if (_isRealized())
       {
          if (config.checked == checked.booleanValue())
          {

=== modified file 'src/com/goldencode/p2j/ui/WidgetConfig.java'
--- old/src/com/goldencode/p2j/ui/WidgetConfig.java	2021-11-02 22:08:37 +0000
+++ new/src/com/goldencode/p2j/ui/WidgetConfig.java	2022-02-08 14:17:34 +0000
@@ -28,6 +28,7 @@
 ** 017 IAS 20200901 Rework (de)serialization.
 **     EVL 20200925 Pack all boolean attributes into single 32-bit integer for socket read/write.
 ** 018 HC  20211102 Implemented i18n support.
+** 019 ME  20220208 Drop temporary 'wasRealized' flag. 
 */ 
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -156,12 +157,6 @@
    /** Flag to indicate whether the widget has been realized. **/
    public boolean realized = false;
    
-   /** Flag to indicate whether the widget's has been realized.
-    *  A temporary solution. Most likely should be revised
-    *  after a proper realization of the realize() method, 
-    * */
-   public boolean wasRealized = false;
-   
    /** The HIDDEN attribute, which stops widgets from displaying. */
    public boolean hidden = false; 
    
@@ -243,9 +238,6 @@
    /** Bitwise mask to mark DISABLE REDRAW atribute usage.  */
    private static final int ATTR_MASK_DIS_REDRAW       = 0x00000100;
    
-   /** Bitwise mask to mark WAS REALIZED atribute usage.  */
-   private static final int ATTR_MASK_WAS_REALIZED     = 0x00000200;
-   
    /**
     * Default constructor (only used in deserialization).
     */
@@ -455,7 +447,6 @@
       if (manualHightlight) booleanAttrs |= ATTR_MASK_MANUAL_HIGHLIGHT;
       if (selectable)       booleanAttrs |= ATTR_MASK_SELECTABLE;
       if (disableRedraw)    booleanAttrs |= ATTR_MASK_DIS_REDRAW;
-      if (wasRealized)      booleanAttrs |= ATTR_MASK_WAS_REALIZED;
       out.writeInt(booleanAttrs);
 
 //      System.err.printf("WidgetConfig.writeExternal: %s; %s: %s, %s, %s, %s, %s, %s, %s, %s\n", 
@@ -500,7 +491,6 @@
       manualHightlight = (booleanAttrs & ATTR_MASK_MANUAL_HIGHLIGHT) == ATTR_MASK_MANUAL_HIGHLIGHT;
       selectable       = (booleanAttrs & ATTR_MASK_SELECTABLE) == ATTR_MASK_SELECTABLE;
       disableRedraw    = (booleanAttrs & ATTR_MASK_DIS_REDRAW) == ATTR_MASK_DIS_REDRAW;
-      wasRealized      = (booleanAttrs & ATTR_MASK_WAS_REALIZED) == ATTR_MASK_WAS_REALIZED;
 
 //      System.err.printf("WidgetConfig.readExternal: %s; %s: %s, %s, %s, %s, %s, %s, %s, %s\n", 
 //            this, id, frameId, popupMenuId, enabled, visible, realized, header, hidden, modified);
@@ -548,7 +538,6 @@
       menuKey = config.menuKey;
       menuMouse = config.menuMouse;
       disableRedraw = config.disableRedraw;
-      wasRealized = config.wasRealized;
    }
    
    /**

=== modified file 'src/com/goldencode/p2j/ui/WindowWidget.java'
--- old/src/com/goldencode/p2j/ui/WindowWidget.java	2022-01-19 14:10:13 +0000
+++ new/src/com/goldencode/p2j/ui/WindowWidget.java	2022-02-09 12:00:51 +0000
@@ -123,6 +123,7 @@
 **                           set attribute of a realized widget. See also #5937-32.
 **     RFB 20220119          The return from getIcon should be empty string if there isn't one set, instead of
 **                           unknown. Refactored after review. Ref #4986.
+**     ME  20220209          Replace getAttr for "realized" with isRealized method.
 */
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -1873,7 +1874,7 @@
    {
       boolean prevDelayedMinimize = getAttr("delayedMinimize", () -> config.delayedMinimize);
       int prevState = getAttr("windowState", () -> config.windowState);
-      boolean realized = getAttr("realized", () -> config.realized, true);
+      boolean realized = _isRealized();
 
       // the delayed minimized behavior comes in effect only when the window has been
       // realized; also note that in this case the WINDOW-STATE attribute value is not affected!

=== modified file 'src/com/goldencode/p2j/ui/chui/FramePlacementManager.java'
--- old/src/com/goldencode/p2j/ui/chui/FramePlacementManager.java	2021-07-26 19:35:58 +0000
+++ new/src/com/goldencode/p2j/ui/chui/FramePlacementManager.java	2022-02-08 15:01:33 +0000
@@ -344,6 +344,7 @@
 **                           do not follow the placement logic for root frames.
 **     EVL 20210726          Fix for issue with setting up child frame location before frame is realized.  If
 **                           init(Column|Row) is valid it should be used instead of 0.
+**     ME  20220208          Use 'isRealised' frame method instead of 'wasRealised' configuration. 
 */
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -460,13 +461,14 @@
     */
    public void placeFrame(Frame<?> frame, boolean hideOthers)
    {
+      FrameConfig cfg = frame.config();
+      
       if (!frame.isRootFrame())
       {
-         FrameConfig fcfg = frame.config();
-         if (!fcfg.wasRealized)
+         if (!frame.isRealized())
          {
-            frame.setLocation(fcfg.initColumn != BaseConfig.INV_COORD ? fcfg.initColumn : 0,
-                              fcfg.initRow != BaseConfig.INV_COORD ? fcfg.initRow : 0);
+            frame.setLocation(cfg.initColumn != BaseConfig.INV_COORD ? cfg.initColumn : 0,
+                              cfg.initRow != BaseConfig.INV_COORD ? cfg.initRow : 0);
          }
          
          return;
@@ -474,7 +476,6 @@
       
       boolean redirected = frame.isRedirected();
 
-      FrameConfig cfg = frame.config();
       cfg.framePlaced = true;
       ArrayList<Frame<?>> list = new ArrayList<Frame<?>>();
       

=== modified file 'src/com/goldencode/p2j/ui/client/widget/AbstractWidget.java'
--- old/src/com/goldencode/p2j/ui/client/widget/AbstractWidget.java	2022-01-31 12:37:46 +0000
+++ new/src/com/goldencode/p2j/ui/client/widget/AbstractWidget.java	2022-02-08 15:05:29 +0000
@@ -190,6 +190,7 @@
 **     CA  20211025 Fixed tooltip issues when the widgets are stacked, in web mode.
 **     MP  20211207 Improve highlighted behavior by trigger repaint if needed
 **     AL2 20220127 Register or deregister a freshly selected or deselected widget.
+**     ME  20220208 Drop use of temporary 'wasRealized' flag. 
 */
 
 /*
@@ -2653,7 +2654,6 @@
          if (visible && !config.realized)
          {
             config.realized = true;
-            config.wasRealized = true;
             Frame container = parent(Frame.class);
             if (container != null)
             {
@@ -3743,7 +3743,6 @@
       }
       
       cfg.realized = false;
-      cfg.wasRealized = false;
       cfg.visible = false;
       cfg.hidden = false;
       

